/* ==========================================================================
   BONUS Inc. — Final Optimized Stylesheet
   現行デザイン・動作を100%維持（重複・競合削除版）
   ========================================================================== */

/* ---- Reset & Base ------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: "Noto Sans JP", system-ui, -apple-system, "Segoe UI", Roboto, "ヒラギノ角ゴ ProN", Meiryo, sans-serif;
  color: #111;
  line-height: 1.9;
  background: #fff;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: #60242e; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Header ------------------------------------------------------------ */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  z-index: 1000;
}

#headerInner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img { display: block; height: 26px; width: auto; }

/* ---- Navigation -------------------------------------------------------- */
#mainnav{ flex:1; display:flex; justify-content:flex-end; }
#mainnav .panel{ display:flex; align-items:center; gap:24px; }

.menu{
  display:flex; align-items:center; list-style:none;
  margin:0; padding:0; gap:28px;
}
.menu a{ text-decoration:none; color:#333; font-weight:600; }
.menu a:hover{ color:#000; }
.menu a.active{ border-bottom:2px solid #111; }

/* ---- Hamburger (PCでは見せない。ここで #menuBtn は定義しない) ---- */
#menuWrap{ display:none; margin:0; }

/* ---- Hamburger --------------------------------------------------------- */
#menuWrap { display: none; margin: 0; }
a#menu {
  display: inline-block;
  position: relative;
  width: 40px;
  height: 40px;
  margin: 10px;
  cursor: pointer;
}
#menuBtn,
#menuBtn::before,
#menuBtn::after {
  display: block;
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  margin-left: -9px;
  background: #000;
  transition: .3s;
}
#menuBtn::before { transform: translateY(-7px); }
#menuBtn::after { transform: translateY(5px); }

#menuBtn.close { background: transparent; }
#menuBtn.close::before {
  transform: rotate(45deg);
}
#menuBtn.close::after {
  transform: rotate(-45deg);
}

/* ---- Responsive (SP Drawer) -------------------------------------------- */
@media screen and (max-width: 880px) {
  #menuWrap { display: block; }
  #mainnav { display: block; }
  #mainnav .panel {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e5e5e5;
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
  }
  .menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  #sns { margin-top: 14px; margin-left: 0; }
}

/* ---- Main Visual ------------------------------------------------------ */
.mainImg {
  position: relative;
  width: 100%;
  height: 65vh;              /* 高さを画面の65%に固定（自然な比率） */
  min-height: 400px;         /* 小さすぎ防止 */
  overflow: hidden;
}

.mainImg .bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;          /* アスペクト比を保って拡大 */
  object-position: center center; /* 中央を基準にトリミング */
}


/* ---- SP調整（スマホではもう少し圧縮） ---- */
@media (max-width: 799px) {
  .mainImg {
    height: 45vh;             /* スマホは画面の45%に縮小 */
    min-height: 280px;
  }
  .head_logo {
    width: 60%;
    max-width: 240px;
  }
}

/* ---- Vision Block ------------------------------------------------------ */
.vision-block {
  width: min(100% - 32px, 900px);
  margin: 40px auto 0;
  padding: clamp(22px, 3vw, 32px);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(0,0,0,.05);
  color: #374151;
  line-height: 2;
  letter-spacing: .03em;
}
.vision-block::first-letter {
  float: left;
  font-size: 3.4rem;
  line-height: 1;
  font-weight: 800;
  color: #60242e;
  margin: .2rem .6rem 0 0;
}
.vision-block::first-line { font-weight: 600; color: #111; }
@media (min-width:960px){ .vision-block{ column-count:2; column-gap:48px; } }
@media (max-width:560px){ .vision-block{ column-count:1; padding:20px; border-radius:12px; } }

/* ---- Services (BRAND) -------------------------------------------------- */
.svc { padding: 60px 0; }
.svc-grid {
  width: min(100% - 32px, 1100px);
  margin: 0 auto;
  display: grid;
  gap: clamp(16px, 3vw, 28px);
  grid-template-columns: repeat(4,1fr);
}
@media (max-width:1024px){ .svc-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width:560px){  .svc-grid{ grid-template-columns: 1fr; } }

.svc-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  transition: .25s;
}
.svc-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
}
.svc-media { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #f3f4f6; }
.svc-media img { width: 100%; height: 100%; object-fit: cover; transition: .5s; }
.svc-card:hover .svc-media img { transform: scale(1.08); }
.svc-title { font-size: 18px; font-weight: 800; margin: 14px 16px 6px; }
.svc-desc { color: #4b5563; line-height: 1.9; margin: 0 16px 18px; }

/* ---- Projects ---------------------------------------------------------- */
.projects { padding: 80px 0; }
.projects-wrap {
  width: min(100% - 32px, 1100px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 64px;
}
.project {
  display: flex;
  align-items: center;
  gap: 48px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,.04);
  padding: 32px;
  transition: .3s;
}
.project:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,.08); }
.project.reverse { flex-direction: row-reverse; }
.project-img { flex: 1 1 45%; border-radius: 14px; overflow: hidden; }
.project-img img { width: 100%; height: 100%; object-fit: cover; transition: .5s; }
.project:hover img { transform: scale(1.05); }
.project-body { flex: 1 1 55%; }
.project-body h3 {
  font-size: 20px; font-weight: 700; margin: 0 0 12px;
  border-left: 4px solid #60242e; padding-left: 10px;
}
.project-body p { color: #4b5563; margin: 0 0 10px; line-height: 1.9; }
@media (max-width:768px){
  .project, .project.reverse { flex-direction: column; gap: 24px; padding: 24px; }
  .project-body h3 { text-align: center; border: none; padding: 0; }
}

/* ---- Company ----------------------------------------------------------- */
.block-company .def {
  width: min(100% - 32px, 900px);
  margin: 0 auto;
  border-top: 1px solid #e5e7eb;
}
.block-company .row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #e5e7eb;
}
.block-company dt { margin: 0; color: #6b7280; }
.block-company dd { margin: 0; }
@media (max-width:560px){ .block-company .row{ grid-template-columns: 1fr; gap: 6px; } }

/* ---- Contact ----------------------------------------------------------- */
.block-contact .form {
  width: min(100% - 32px, 900px);
  margin: 0 auto;
}
.block-contact label { display: block; font-weight: 700; margin-bottom: 6px; }
.block-contact .req {
  display: inline-block;
  font-size: 12px;
  color: #fff;
  background: #ef4444;
  padding: 2px 6px;
  border-radius: 999px;
  margin-left: 6px;
}
.block-contact input,
.block-contact textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  padding: 10px 12px;
  font-size: 16px;
  outline: none;
}
.block-contact textarea { min-height: 160px; resize: vertical; }
.block-contact input:focus,
.block-contact textarea:focus {
  border-color: #0ea5a8;
  box-shadow: 0 0 0 2px rgba(14,165,168,.15);
}
.block-contact .btn {
  display: block;
  margin: 24px auto 0;
  background: #60242e;
  color: #fff;
  font-weight: 700;
  border: 0;
  border-radius: 6px;
  padding: 10px 28px;
  cursor: pointer;
}
.block-contact .btn:hover { filter: brightness(1.05); }
.block-contact .note { text-align: center; font-size: 13px; color: #6b7280; margin-top: 10px; }
.block-contact .policy-note {
  width: min(100% - 32px, 900px);
  margin: 12px auto 0;
  padding: 14px 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: #333;
  line-height: 1.9;
}

/* ---- Footer ------------------------------------------------------------ */
#footer {
  text-align: center;
  font-size: 12px;
  padding: 50px 10px 60px;
  color: #6b7280;
}

section h2{
	width: 60%;
	margin: 70px auto;
	font-size: 22px;
	font-weight:normal;
	text-align: center;
}

section h2 span {
	padding-bottom: 20px;
	border-bottom: 3px solid #60242e;
}

@media (max-width: 799px) {
  #menuWrap {
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 1001;
  }

  a#menu {
    display: block;
    width: 40px;
    height: 40px;
    position: relative;
    cursor: pointer;
  }

  /* ---- 3本線を別spanで完全固定 ---- */
  a#menu .bar {
    display: block;
    position: absolute;
    left: 9px;
    width: 22px;
    height: 2px;
    background: #000;
    transition: 0.3s;
  }

  a#menu .bar.top    { top: 10px; }
  a#menu .bar.middle { top: 18px; }
  a#menu .bar.bottom { top: 26px; }

  /* ---- ×マーク ---- */
  a#menu.close .bar.top {
    transform: rotate(45deg);
    top: 18px;
  }
  a#menu.close .bar.middle {
    opacity: 0;
  }
  a#menu.close .bar.bottom {
    transform: rotate(-45deg);
    top: 18px;
  }

  /* ---- メニュー本体 ---- */
  .panel {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #ccc;
    z-index: 1000;
  }
}
@media (min-width: 800px) {
  #menuWrap { display: none; }       /* ハンバーガー非表示（PCでは不要） */
  #mainnav .panel {
    display: flex !important;        /* ナビを横並びで再表示 */
    align-items: center;
    gap: 24px;
    position: static;
    background: transparent;
    border: none;
    padding: 0;
  }
  .menu {
    flex-direction: row;
    gap: 28px;
  }
}

/* ==== Section background colors ==== */
#top,
.mainImg { background: #ffffff; } /* 白（メインビジュアル） */

#sec01 { background: #f9fafb; }   /* ご挨拶セクション：ほんのりグレー */
#services { background: #ffffff; } /* 事業内容：白でスッキリ */
#sec04 { background: #f3f4f6; }   /* プロジェクト：少し濃いグレー */
#company { background: #ffffff; }  /* 会社概要 */
#contact { background: #f9fafb; }  /* お問い合わせ */

/* ==== spacing fix: main visual ↔ ご挨拶 ==== */

/* 画像周りの余白・ズレをゼロに */
.mainImg { margin-bottom: 0; }
.mainImg img { display: block; line-height: 0; }

/* ご挨拶セクションの上下パディングを最適化 */
#sec01 { 
  margin-top: 0;           /* 余計な上マージンを無効化 */
  padding-top: 28px;       /* ← 上の空きを縮める（お好みで 24–36px） */
  padding-bottom: 64px;    /* ← 下に余白を作る（お好みで 56–80px） */
}

/* 見出しが余白を増やさないように */
#sec01 h2 { margin-top: 0; }

/* ご挨拶本文ブロック（カード等）がある場合の微調整 */
#sec01 .vision-block,
#sec01 .card,
#sec01 .box {
  margin-top: 16px;        /* 見出しとの距離だけを確保 */
}
