/* ページ全体を縦に伸ばす */
html, body {
  height: 100%;
  margin: 0;
}

/* 本体をflexで縦並びにする */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* 画面高さ100% */
}

/* main部分を伸縮可能にする */
main {
  flex: 1;
}

/* フッター */
footer {
  background: #80BA4A;
  color: #fff;
  text-align: center;
  padding: 15px;
}



/* メイン */
/* heroセクション全体 */
/* 初期状態（画面読み込み前） */
#hero {
  background-image: url(../images/logo1.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  width: 100%;
  height: 500px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #3d3c3c;
  text-align: center;
  margin-bottom: 90px;

  /* アニメーション用 */
  opacity: 0;                     /* 最初は透明 */
  transform: translateY(50px);    /* 下にずらして開始 */
  animation: floatIn 2s ease-out forwards; /* 1秒で浮き上がる */
  animation-delay: 0.5s;          /* 0.3秒遅らせて登場 */
}


/* hero 内のテキスト */
#hero .hero_inner p.pop {
  font-family: 'Oswald', sans-serif;
  font-size: 20px;
  margin-top: -30px;    /* 上の余白 */
  margin-bottom: 20px; /* 下の余白 */
}

/* 強みセクション全体 */
#features {
  padding: 80px 20px;
  text-align: center;
  background: #fafafa;
}

/* heroセクション全体 */
#hero {
  background-image: url(../images/logo1.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  width: 100%;
  height: 500px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #3d3c3c;
  text-align: center;
  margin-bottom: 90px;

  /* アニメーション用（初期状態） */
  opacity: 0;
  transform: translateY(60px);
  transition: all 2.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* 表示時にふわっと */
#hero.visible {
  opacity: 1;
  transform: translateY(0);
}



#features h2 {
  font-size: 2rem;
  margin-bottom: 50px;
  color: #333;
  position: relative;
}

#features h2::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #80BA4A, #F28C00);
  margin: 12px auto 0;
  border-radius: 2px;
}

/* 強みの各カード */
.feature-item {
  flex: 1 1 calc(33.333% - 40px);
  background: #fff;
  border-radius: 15px;
  padding: 40px 25px;
  margin: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
  border-top: 6px solid transparent;
  position: relative; /* 擬似要素用 */
  overflow: hidden;   /* 背景がはみ出さないように */
}

/* 背景ひし形 */
.feature-item::before {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, rgba(128,186,74,0.12), rgba(242,140,0,0.12));
  transform: rotate(45deg);
  top: -40px;
  right: -40px;
  z-index: 0;
  border-radius: 8px;
}

/* コンテンツを前面に */
.feature-item * {
  position: relative;
  z-index: 1;
}

/* ホバー時のアニメーション */
.feature-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  border-top: 6px solid #F28C00;
}

/* タイトル部分 */
.feature-item h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: #80BA4A;
  font-weight: 700;
  position: relative;
}

.feature-item h3::before {
  content: "◆";
  color: #F28C00;
  margin-right: 8px;
  font-size: 0.9rem;
}

/* 説明文 */
.feature-item p {
  color: #555;
  font-size: 1rem;
  line-height: 1.6;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
  .feature-item {
    flex: 1 1 100%;
  }
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 30px;
  background: #80BA4A;
  color: #fff;
  text-decoration: none;
  margin: 10px;
  transition: 0.3s;
}
.btn:hover { opacity: 0.8; }
.btn.orange { background: darkorange; }

/* 強みセクション全体を最初は非表示に */
#features {
  opacity: 0;
  transform: translateY(50px);
  transition: all 1.8s cubic-bezier(0.25, 1, 0.5, 1);
}

#features.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- ここから下は今まで通りの feature-item アニメーション --- */
.feature-item {
  opacity: 0;
  transform: translateY(50px) scale(0.95);
  transition: all 1.5s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 0 0 rgba(0,0,0,0);
}

.feature-item.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

/* 順番に出現する遅延 */
.feature-item:nth-child(1).visible { transition-delay: 0.7s; }
.feature-item:nth-child(2).visible { transition-delay: 1s; }
.feature-item:nth-child(3).visible { transition-delay: 1.3s; }


/* 背景デザイン */
#bgCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* ヘッダーとフッターが見えるように */
header, footer {
  position: relative; /* 必須: z-index を効かせるため */
  z-index: 10;        /* canvas (0) より大きければ上に表示 */
}

main, #cta {
  position: relative; /* z-index を効かせるために必要 */
  z-index: 1;         /* canvas(0)より上 */
}
