/* =============================================
   1ページ構成サイト - スタイルシート

   構造:
   - header: ヘッダー（ロゴ + ナビ）
   - main: メインコンテンツ
     - section: 各セクション
   - footer: フッター
   - back-to-top: TOPへ戻るボタン
   ============================================= */

/* -----------------------------------------
   リセット・基本設定
   ----------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;  /* スムーススクロール */
}

body {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  line-height: 1.8;
  color: #333;
  background-color: #fff;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

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

/* -----------------------------------------
   共通コンポーネント
   ----------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* セクション共通 */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #e63946;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
}

/* ボタン */
.button {
  display: inline-block;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.3s ease;
  text-align: center;
}

.button--primary {
  background-color: #e63946;
  color: #fff;
}

.button--primary:hover {
  background-color: #c1121f;
  transform: translateY(-2px);
}

.button--large {
  padding: 18px 48px;
  font-size: 1.0625rem;
}

/* -----------------------------------------
   header: サイトヘッダー
   ----------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
}

.site-logo {
  font-size: 1.375rem;
  font-weight: 700;
  color: #1a1a1a;
}

/* ナビゲーション（アンカーリンク） */
.global-nav {
  display: none;  /* モバイルでは非表示 */
}

.nav-list {
  display: flex;
  gap: 28px;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #555;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #e63946;
}

/* -----------------------------------------
   ヒーローセクション
   ----------------------------------------- */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
  color: #fff;
  padding: 120px 20px 80px;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
}

.hero-lead {
  font-size: 1.125rem;
  opacity: 0.85;
  margin-bottom: 32px;
}

/* -----------------------------------------
   section: About（画像 + テキストの並び）
   ----------------------------------------- */
.about-section {
  background-color: #fff;
}

/* 画像とテキストのグリッド配置 */
.about-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.about-image img {
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.about-heading {
  font-size: 1.375rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.5;
  margin-bottom: 20px;
}

.about-text {
  color: #555;
  margin-bottom: 16px;
}

.about-features {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #eee;
}

.about-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  color: #333;
}

.about-features li::before {
  content: "✓";
  color: #e63946;
  font-weight: 700;
}

/* -----------------------------------------
   section: Services（3カラムカード）
   ----------------------------------------- */
.services-section {
  background-color: #f8f9fa;
}

/* 3カラムグリッド */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;  /* モバイル: 1列 */
  gap: 24px;
}

.service-card {
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

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

.service-card-body {
  padding: 24px;
}

.service-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 12px;
}

.service-card-text {
  font-size: 0.9375rem;
  color: #666;
  line-height: 1.7;
}

/* -----------------------------------------
   section: Works
   ----------------------------------------- */
.works-section {
  background-color: #fff;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.work-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.work-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.work-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.8));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.work-item:hover .work-overlay {
  opacity: 1;
}

.work-category {
  font-size: 0.75rem;
  font-weight: 600;
  color: #e63946;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.work-title {
  font-size: 1rem;
  font-weight: 600;
}

/* -----------------------------------------
   section: Contact
   ----------------------------------------- */
.contact-section {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
  color: #fff;
  text-align: center;
}

.contact-section .section-label {
  color: #ff6b6b;
}

.contact-section .section-title {
  color: #fff;
}

.contact-lead {
  font-size: 1.0625rem;
  opacity: 0.9;
  margin-bottom: 32px;
  line-height: 1.8;
}

/* -----------------------------------------
   footer: フッター
   ----------------------------------------- */
.site-footer {
  background-color: #0d0d0d;
  color: #fff;
  padding: 40px 0 24px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
  font-size: 1.25rem;
  font-weight: 700;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.footer-nav a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-copyright {
  text-align: center;
  padding-top: 24px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8125rem;
}

/* -----------------------------------------
   TOPへ戻るボタン
   ----------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 50px;
  height: 50px;
  background-color: #e63946;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
  transition: all 0.3s ease;
  z-index: 999;

  /* 初期状態: 非表示 */
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

/* 表示状態（JSで付与） */
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: #c1121f;
  transform: translateY(-4px);
}

.back-to-top-icon {
  font-size: 1.25rem;
  font-weight: 700;
}

/* =============================================
   レスポンシブ対応
   ============================================= */

/* タブレット (768px以上) */
@media (min-width: 768px) {
  .container {
    padding: 0 32px;
  }

  .section {
    padding: 100px 0;
  }

  .section-title {
    font-size: 2rem;
  }

  /* ナビゲーション表示 */
  .global-nav {
    display: block;
  }

  /* ヒーロー */
  .hero-title {
    font-size: 3.5rem;
  }

  .hero-lead {
    font-size: 1.25rem;
  }

  /* About: 画像とテキストを横並び */
  .about-grid {
    flex-direction: row;
    align-items: center;
    gap: 48px;
  }

  .about-image {
    flex: 1;
  }

  .about-body {
    flex: 1;
  }

  .about-heading {
    font-size: 1.5rem;
  }

  /* Services: 3カラム */
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }

  /* Works: 4列 */
  .works-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }

  /* Footer */
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* デスクトップ (1024px以上) */
@media (min-width: 1024px) {
  .section {
    padding: 120px 0;
  }

  .section-header {
    margin-bottom: 64px;
  }

  .section-title {
    font-size: 2.25rem;
  }

  /* ヒーロー */
  .hero-title {
    font-size: 4.5rem;
  }

  /* About */
  .about-grid {
    gap: 64px;
  }

  .about-heading {
    font-size: 1.75rem;
  }

  /* Services */
  .services-grid {
    gap: 32px;
  }

  .service-card-body {
    padding: 28px;
  }

  /* Works */
  .works-grid {
    gap: 24px;
  }
}
