:root {
  --bg-color: #fbfbfd;
  --text-main: #1d1d1f;
  --text-muted: #86868b;
  --accent-color: #0066cc;
  --white: #ffffff;
  --black: #000000;
  --font-family: "Inter", "San Francisco", "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-padding-top: 80px;
}
body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
/* Header */
#header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(251, 251, 253, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  z-index: 999;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
}
.logo {
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
}
nav a {
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 400;
  transition: color 0.3s;
}
nav a:hover {
  color: var(--accent-color);
}
/* Hero Section */
.hero {
  position: relative;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background-color: var(--black);
  color: var(--white);
  padding-top: 60px;
}
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('img/hero_bg.png');
  background-size: cover;
  background-position: center;
  opacity: 0.55;
  z-index: 1;
  transition: opacity 2s ease;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
}
.hero h1 {
  font-size: 4.2rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  line-height: 1.1;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}
.hero p {
  font-size: 1.6rem;
  font-weight: 300;
  margin-bottom: 45px;
  color: #f5f5f7;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.02em;
}
/* Buttons */
.btn-primary {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 980px;
  font-size: 1.05rem;
  text-decoration: none;
  transition: all 0.3s ease;
  background-color: var(--white);
  color: var(--black);
}
.btn-primary:hover {
  background-color: #f0f0f0;
  transform: scale(1.03);
}
/* contact buttons adjustments */
.contact-methods .btn-primary {
  background-color: var(--accent-color);
  color: var(--white);
}
.contact-methods .btn-primary:hover {
  background-color: #0077ed;
}
/* Sections */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.section-header {
  text-align: center;
  margin: 120px auto 80px;
}
.section-header h2 {
  font-size: 3rem;
  font-weight: 600;
  margin-bottom: 15px;
}
.section-header p {
  font-size: 1.3rem;
  color: var(--text-muted);
}
.service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto 140px;
  padding: 0 20px;
  gap: 80px;
}
.service-row.reverse {
  flex-direction: row-reverse;
}
.service-text {
  flex: 1;
}
.service-text h3 {
  font-size: 2.4rem;
  font-weight: 600;
  margin-bottom: 25px;
}
.service-text p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 35px;
  line-height: 1.6;
}
.service-link {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s;
}
.service-link:hover {
  opacity: 0.7;
  text-decoration: underline;
}
.check-list {
  list-style: none;
  font-size: 1.05rem;
}
.check-list li {
  position: relative;
  margin-bottom: 16px;
  padding-left: 32px;
}
.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
}
.service-image {
  flex: 1;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.06);
  background-color: #fff;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.service-image:hover img {
  transform: scale(1.1);
}
/* ==========================================================================
   Works Section (施工実績)
   ========================================================================== */

/* 実績セクション全体のコンテナ */
.works {
  /* サービス紹介の余白(140px)と統一し、最下部にしっかり空白を作ります */
  padding-bottom: 140px; 
}

/* 実績カードを並べる親要素（Flexbox採用でDWエラーを回避） */
.works-grid {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

/* 各実績カードの基本設定 */
.work-item {
  /* 3列並べるための計算 (隙間30pxを考慮) */
  width: calc((100% - 60px) / 3);
  background: var(--white);
  border: 1px solid #d2d2d7; /* 洗練されたグレーの枠線 */
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: default; /* 基本はクリック不可のカーソル */
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ホームページ制作など、リンクがあるカードのみの挙動 */
.work-item.is-link {
  cursor: pointer; /* 重ねると指マークに変わる */
}

.work-item.is-link:hover {
  transform: translateY(-8px);
  border-color: var(--accent-color);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* 実績画像エリア */
.work-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid #d2d2d7;
}

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

/* リンクあり時のみ画像もズーム */
.work-item.is-link:hover .work-img img {
  transform: scale(1.05);
}

/* テキスト情報エリア */
.work-info {
  padding: 20px;
}

/* カテゴリ表示（青文字） */
.work-category {
  font-size: 0.75rem;
  color: var(--accent-color);
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

/* 実績タイトル */
.work-info h4 {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-main);
}

/* --------------------------------------------------------------------------
   Responsive (スマホ対応)
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .works {
    padding-bottom: 80px; /* スマホでは余白を少しコンパクトに */
  }

  /* 2列にするための親要素の設定 */
  .works-grid {
    gap: 15px; /* スマホではカード間の隙間を少し狭く（30px→15px） */
  }
  
  /* カード1枚あたりの横幅を 50%（隙間を引いた分）にする */
  .work-item {
    width: calc((100% - 15px) / 2); 
    border-radius: 12px; /* スマホでは角丸を少し小さくすると繊細に見えます */
  }

  /* スマホでのテキストサイズ微調整 */
  .work-info {
    padding: 12px; /* 余白を詰める */
  }

  .work-info h4 {
    font-size: 0.95rem; /* タイトルを少し小さくして収まりを良くする */
  }

  .work-category {
    font-size: 0.65rem; /* カテゴリ名も小さく */
    margin-bottom: 5px;
  }
}
/* Contact & Footer */
.contact {
  background-color: #f5f5f7;
  padding: 120px 20px;
  text-align: center;
  border-radius: 40px 40px 0 0;
}
.contact-container {
  max-width: 800px;
  margin: 0 auto;
}
.contact h2 {
  font-size: 2.8rem;
  font-weight: 600;
  margin-bottom: 25px;
}
.contact p {
  font-size: 1.3rem;
  color: var(--text-muted);
  margin-bottom: 50px;
}
.contact-methods {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 80px;
}
.company-info {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 2;
}
footer {
  background-color: #f5f5f7;
  padding: 0 20px 40px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}
/* Animations */
.slide-up {
  opacity: 0;
  transform: translateY(120px) scale(0.95);
  filter: blur(8px);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), filter 1.2s ease-out;
}
.slide-up.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}
/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.lightbox-content {
  max-width: 90%;
  max-height: 80%;
  border-radius: 12px;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}
.lightbox.active .lightbox-content {
  transform: scale(1);
}
.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: white;
  font-size: 40px;
  cursor: pointer;
}
@media (max-width: 900px) {
  .service-row, .service-row.reverse {
    flex-direction: column;
    text-align: center;
    gap: 40px;
    margin-bottom: 100px;
  }
  .contact-methods {
    flex-direction: column;
  }
}