/* =====================================================
   Base Styles
   ===================================================== */


/*背景演出（シルクスプレッド）*/
html, body {
  margin: 0;
  height: 100%;
}
/* すべての要素を扱いやすく */
*, *::before, *::after {
  box-sizing: border-box;
}

/* body の基本設定 */
body {
  min-height: 100vh;
  font-family: "Noto Sans JP","Hiragino Sans","Yu Gothic","Meiryo",system-ui,sans-serif;
  line-height: 1.6;
  color: #fff;

  /* ▼ 常に表示したい背景画像 */
  background-image: url("../images/back.jpg");
  background-size: cover;          /* 画面に合わせて拡大縮小 */
  background-position: center top; /* 中央上寄せ */
  background-repeat: no-repeat;    /* 繰り返さない */
  background-attachment: fixed;    /* スクロールしても固定 */

  /* 背景が見えない場合の保険色 */
  background-color: #000;
}


/* =========================
   ヒーロー全体
========================= */

.hero {
  width: 100%;
  position: relative;
}

/* ロゴ＋タイトルの中央配置コンテナ */
.hero-inner {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: flex-start; /* ← center をやめる */
  padding-top: 10vh;            /* ← ここで微調整 */
}

/* =========================
   ロゴ
========================= */

.logo-intro {
  margin-bottom: 2px; /* ロゴとタイトルの間隔 */
}

.logo-intro img {
  max-width: 300px;
  width: 100%;
  height: auto;
  display: block;

  opacity: 0;
  animation: logoAppear 2.2s ease-out forwards;
  animation-delay: 0.8s;
}

/* ロゴ表示アニメーション */
@keyframes logoAppear {
  0% {
    opacity: 0;
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* =========================
   タイトル
========================= */

.title {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 55px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.05em;
  perspective: 1000px;
}

.title span {
  display: inline-block;
  transform: scale(2.2) translateY(40px);
  opacity: 0;
  animation: absorb 0.8s ease-out forwards;

  animation-delay: calc(var(--delay) + 2.0s);
}

/* 文字ごとのディレイ */
.title span:nth-child(1)  { --delay: 0.05s; }
.title span:nth-child(2)  { --delay: 0.10s; }
.title span:nth-child(3)  { --delay: 0.15s; }
.title span:nth-child(4)  { --delay: 0.20s; }
.title span:nth-child(5)  { --delay: 0.25s; }
.title span:nth-child(6)  { --delay: 0.30s; }
.title span:nth-child(7)  { --delay: 0.35s; }
.title span:nth-child(8)  { --delay: 0.40s; }
.title span:nth-child(9)  { --delay: 0.45s; }
.title span:nth-child(10) { --delay: 0.50s; }
.title span:nth-child(11) { --delay: 0.55s; }
.title span:nth-child(12) { --delay: 0.60s; }
.title span:nth-child(13) { --delay: 0.65s; }
.title span:nth-child(14) { --delay: 0.70s; }
.title span:nth-child(15) { --delay: 0.75s; }
.title span:nth-child(16) { --delay: 0.80s; }
.title span:nth-child(17) { --delay: 0.85s; }

.tight-no {
  margin-left: -0.5em;
}

/* 吸着アニメーション */
@keyframes absorb {
  0% {
    transform: scale(2.2) translateY(40px);
    opacity: 0;
  }
  70% {
    transform: scale(0.95) translateY(-2px);
    opacity: 1;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* ===== 初回表示のみアニメーション ===== */

body.is-first-view::before {
  animation: spread 1.2s ease-out forwards;
  animation-delay: 0.6s;
}

@keyframes spread {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}


/* ===== 導入コピー演出 ===== */

.lead {
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
  margin-top: 18px;
  margin-bottom: 50px;
  text-align: center;
  font-size: 20px;
  line-height: 1.9;
  max-width: 720px;
  margin-bottom: 120px; /* 下の余白 */

  opacity: 0;
  animation: leadFade 1.2s ease-out forwards;
  animation-delay: 3.0s; /* ← タイトル後に出す */
}
.break-lead {
  display: none;
}

@keyframes leadFade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   リードコピー下 
========================= */

.whatwedo-wrapper {
  margin-bottom: 8px; /* 下の余白 */
  text-align: center;
}

.whatwedo {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 1.0s ease-out forwards;
  animation-delay: 4.5s; 
}

.whatwedo img {
  width: 200px;  /* 幅固定 */
  height: auto;  /* 縦横比維持 */
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.whatwedo img {
  max-width: 100%;
  align-items: center;
  height: auto;
}


/* =========================
   業務内容
========================= */

.service-grid {
  max-width: 820px;
  margin: 10px auto;          /* 上下余白＋センター */
  margin-bottom: 120px; /* 下の余白 */
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;

  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 1.0s ease-out forwards;
  animation-delay: 4.5s; /* ← リードの後 */
}

.service-item {
  border: 1px solid #ccc;
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  font-size: 22px;
  letter-spacing: 0.05em;
  }

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   主な制作物
========================= */

.works-grid {
  max-width: 820px;
  margin: 40px auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 横3列 */
  gap: 24px;                            /* アイテム間の隙間 */

  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 1.0s ease-out forwards;
  animation-delay: 4.5s; /* ← リードの後 */
}

.work-item {
  display: flex;
  justify-content: center;
}

.work-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  width: 240px;       /* 丸の直径 */
  height: 240px;
  border: 1px solid #ccc;
  border-radius: 50%;
  color: #fff;
  text-align: center;
  padding: 16px;
  font-size: 22px;
  line-height: 1.4;  
 }

 .service-desc {
  font-size: 16px;
}

 @keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   会社概要
========================= */
.company {
  padding: 80px 20px;
  text-align: left;
  color: #fff;
  position: relative;
  z-index: 1;

  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 1.0s ease-out forwards;
  animation-delay: 4.5s; /* ← リードの後 */
}
.company-table {
  width: 100%;
  max-width: 820px;
  margin: 40px auto;
  border-collapse: collapse;
  border-top: 1px solid rgba(255,255,255,0.4);
}

.company-table th,
.company-table td {
  padding: 12px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  font-size: 15px;
}

.company-table th {
  width: 18%;
  font-weight: normal;
  text-align: left;
  opacity: 0.85;
}

.company-table td {
  width: 82%;
  text-align: left;
}

@keyframes companyFade {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   フッター
========================= */

.site-footer {
  position: relative;
  z-index: 1;
  background: transparent;
  padding: 20px;
  text-align: center;

  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 1.0s ease-out forwards;
  animation-delay: 4.5s; /* ← リードの後 */  
}
.copyright {
  font-size: 11px;
  opacity: 0.6;
  letter-spacing: 0.05em;

  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 1.0s ease-out forwards;
  animation-delay: 4.5s; /* ← リードの後 */
}

@keyframes companyFade {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   お問合せ
========================= */

.mail-btn {
  position: relative;
  z-index: 2;

  display: block;
  margin: 10px auto;
  padding: 10px 20px;

  font-size: 14px;
  letter-spacing: 0.1em;

  color: #2f7d32;
  background: #fff;
  border: none;
  cursor: pointer;

  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 1.0s ease-out forwards;
  animation-delay: 4.5s; /* ← リードの後 */
}

.mail-btn:hover {
  opacity: 0.85;
}

@keyframes companyFade {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   トップに戻るボタン
========================= */
.scroll-top-btn {
  position: fixed;
  bottom: 40px;       /* 下からの距離 */
  right: 200px;       /* 右からの距離 */
  z-index: 999;       /* 浮かせる */
  
  width: 50px;        /* 正円にする幅 */
  height: 50px;       /* 正円にする高さ */
  
  font-size: 18px;
  border: none;
  border-radius: 50%; /* 正円 */
  background-color: #326635; /* 緑系 */
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  
  /* 初期は非表示かつ下にずらす */
  opacity: 0;
  transform: translateY(20px);
  
  /* トランジションでスムーズ表示 */
  transition: opacity 0.4s ease, transform 0.4s ease;
  
  display: flex;      /* 表示時に中央揃えできるように */
  align-items: center;
  justify-content: center;
}

/* 表示時 */
.scroll-top-btn.show {
  opacity: 1;
  transform: translateY(0); /* 元の位置に */
}

/* ホバー時の微調整 */
.scroll-top-btn:hover {
  opacity: 0.85;
}

/* Googleマップリンクボタン */
.map-link-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 1px 10px;

  font-size: 13px;
  letter-spacing: 0.05em;

  color: #2f7d32;
  background: rgba(255,255,255,0.9);
  border-radius: 20px;

  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
}

.map-link-btn:hover {
  background: #2f7d32;
  color: #fff;
}


/* =========================
   レスポンシブ　768px
========================= */

@media (max-width: 768px) {
  /* サービスグリッド */
  .service-grid {
    grid-template-columns: repeat(3, 1fr); /* 横3列固定 */
    gap: 12px;           /* アイテム間の上下左右の間隔 */
    max-width: 90%;
    margin: 0 auto;
    padding: 0 4px;     /* 左右余白 */
    margin-bottom: 40px;
  }

  .service-item {
    width: 100%;         /* グリッド幅に合わせる */
    height: 60px;        /* 高さを少し縮小 */
    font-size: 18px;     /* テキストも少し小さく */

    display: flex;        /* Flexbox */
    align-items: center;  /* 縦中央 */
    justify-content: center; /* 横中央 */
    text-align: center;   /* 万が一の改行時も中央揃え */
    padding: 0; 
  }

    /* ワークグリッド */
  .works-grid {
    grid-template-columns: repeat(3, 1fr); /* 横3列固定 */
    gap: 16px;          /* アイテム間の間隔 */
    max-width: 90%;
    margin: 0 auto;
    padding: 0 10px;    /* 左右余白 */
  }

  .work-circle {
    width: 200px;       /* 3列で収まるサイズ */
    height: 200px;
    font-size: 18px;
  }

  .service-desc {
    font-size: 14px; 
  }

  .company-table {
    width: 100%;
  }

  .scroll-top-btn {
    right: 20px; /* 右端に寄せる */
  }
}

/* =========================
   レスポンシブ　425px
========================= */

@media (max-width: 425px) {

/* ロゴ */
  .logo-intro img {
    max-width: 200px; /* 300 → 200 */
  }

  /* キャッチコピー（タイトル） */
  .title {
    font-size: 34px;  /* 55 → 34 */
    line-height: 1.3;
    letter-spacing: 0.04em;
  }

  /* 文字アニメーションの初期スケールを抑える */
  .title span {
    transform: scale(1.6) translateY(24px);
  }

  /* リードコピー */
  .lead {
    font-size: 18px;
    line-height: 1.7;
    max-width: 90%;
    margin-bottom: 60px;
  }

  /* 上部全体の詰め */
  .hero-inner {
    padding-top: 6vh; /* 10vh → 6vh */
  }

  .break-lead {
    display: inline;
  }


  /* サービスグリッド：横2列に変更 */
  .service-grid {
    grid-template-columns: repeat(2, 1fr); /* 横2列 */
    gap: 12px;           /* アイテム間の上下左右の間隔 */
    max-width: 90%;
    margin: 0 auto;
    padding: 0 4px;      /* 左右余白 */
    margin-bottom: 40px;
  }

  .service-item {
    width: 100%;         /* グリッド幅に合わせる */
    height: 60px;        /* 高さは768と同じ */
    font-size: 16px;     /* 少し小さく */
    display: flex;
    align-items: center;  /* 縦中央 */
    justify-content: center; /* 横中央 */
    text-align: center;
    padding: 0; 
  }

  /* ワークグリッド：横2列に変更 */
  .works-grid {
    grid-template-columns: repeat(2, 1fr); /* 横2列 */
    gap: 16px;
    max-width: 90%;
    margin: 0 auto;
    padding: 0 10px;      /* 左右余白 */
  }

  .work-circle {
    width: 180px;         /* 2列に収まるサイズに調整 */
    height: 180px;
    font-size: 20px;
  }

  .service-desc {
    font-size: 12px;      /* テキストも少し縮小 */
  }

  /* 会社概要テーブル */
  .company-table {
    width: 100%; 
  }

  .company-table th,
  .company-table td {
    font-size: 13px;
    padding: 8px 6px; /* 行間も少し詰める */
  }

  /* トップに戻るボタン右端寄せ */
  .scroll-top-btn {
    right: 20px;
  }
}

/* =========================
   レスポンシブ　375px
========================= */

@media (max-width: 375px) {

  body {
    overflow-x: hidden;
  }

    /* キャッチコピー（タイトル） */
  .title {
    font-size: 30px; 
    line-height: 1.3;
    letter-spacing: 0.04em;
  }

  /* 文字アニメーションの初期スケールを抑える */
  .title span {
    transform: scale(1.6) translateY(24px);
  }

  .service-grid,
  .works-grid {
    padding: 0 4px;
  }

  .work-circle {
    width: 160px;
    height: 160px;
    font-size: 16px;
  }
}

/* =========================
   レスポンシブ　320px
========================= */

@media (max-width: 320px) {

  body {
    overflow-x: hidden;
  }

    /* キャッチコピー（タイトル） */
  .title {
    font-size: 20px; 
    line-height: 1.3;
    letter-spacing: 0.04em;
  }

  /* 文字アニメーションの初期スケールを抑える */
  .title span {
    transform: scale(1.6) translateY(24px);
  }

   /* リードコピー */
  .lead {
    font-size: 12px;
    line-height: 1.7;
    max-width: 90%;
    margin-bottom: 60px;
  }

  /* 上部全体の詰め */
  .hero-inner {
    padding-top: 6vh; /* 10vh → 6vh */
  }

  .break-lead {
    display: inline;
  }

  .company {
    padding: 40px 6px;
    box-sizing: border-box;
  }

  .company-table {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  .company-table th,
  .company-table td {
    padding: 4px 2px;
    font-size: 11px;
  }

  .service-grid,
  .works-grid {
    max-width: 95%;
    padding: 0 4px;
  }

  .work-circle {
    width: 135px;
    height: 135px;
    font-size: 12px;
  }
  
  .service-desc {
    font-size: 10px;      /* テキストも少し縮小 */
  }

  .service-item {
    width: 100%;         /* グリッド幅に合わせる */
    height: 60px;        /* 高さは768と同じ */
    font-size: 14px;     /* 少し小さく */
    display: flex;
    align-items: center;  /* 縦中央 */
    justify-content: center; /* 横中央 */
    text-align: center;
    padding: 0; 
  }
}




















