/* =========================
   Header
========================= */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* height: 50px; */
  /* background-color: red; */
}

header h1 {
  font-weight: 700;
  margin: 0;
  font-size: 20px;
  padding: 10px 20px;
  line-height: 23px;
  /* background-color: red; */
}

header h1 span {
  font-size: 13px;
}

/* =========================
   Global list style
   ※ここで display:flex を書くと全ULが横並びになって事故ります
========================= */
ul {
  list-style: none;
  padding: 0;
  margin: 0;
  /* background-color: pink; */
}

/* =========================
   Header nav (PC)
========================= */
.site-nav {
  margin-left: auto; /* 右寄せ */
  position: relative; /* SPのドロップダウン基準 */
}

header nav ul {
  display: flex; /* ヘッダーのULだけ横並び */
  align-items: center;
}

header ul li {
  font-size: 15px;
  letter-spacing: 2px;
  padding: 30px 45px;
}

header ul li:last-child {
  background-color: #2f6fb3;
  color: #fff;
  height: 100%;
}

/* ハンバーガー：PCは非表示 */
.nav-toggle {
  display: none;
}

/* =========================
   Main / Top visual
========================= */
main {
  width: 100%;
  height: 100vh;
  background-image: url(../img/main.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

main .top-visual {
  color: #fff;
  text-align: center;
  text-shadow: 1px 1px 1px #6f6f6f;
  margin: 0;
  padding: 250px 0 0 0;
  line-height: 60px;
}

main .top-visual h1 {
  margin: 0;
  font-size: 55px;
  text-underline-offset: 10px;
  text-decoration: 4px underline #fff;
}

main .top-visual span {
  font-size: 15px;
}

/* =========================
   About
========================= */
.about {
  text-align: center;
  color: #2f6fb3;
  padding: 50px 0;
  width: 60%;
  margin: auto;
  font-size: 15px;
  line-height: 30px;
}

.about h2 {
  font-size: 32px;
  font-weight: bold;
  margin: 50px auto;
}

/* =========================
   Service / Works / Company / Contact (section title)
========================= */
.service {
  padding: 50px 0;
}

.works {
  padding: 50px 0 0;
}

.service h2,
.works h2,
.company h2,
.contact h2 {
  font-size: 32px;
  text-align: center;
  line-height: 30px;
}

.service h2 span,
.works h2 span,
.company h2 span,
.contact h2 span {
  font-size: 13px;
}

/* =========================
   Service list
========================= */
.service ul {
  display: block;
  width: 90%;
  margin: auto;
}

.service ul li {
  font-size: 13px;
  line-height: 30px;
  display: flex;
  margin: 70px 0;
  justify-content: space-between;
}

.service ul li .service-text {
  width: 40%;
}

.service ul li .img {
  width: 55%;
}

.service ul li .img img {
  display: block;
  width: 100%;
  height: auto;
}

.service ul li h2 {
  text-align: left;
  background-color: #2f6fb3;
  color: #fff;
  padding: 10px 10px;
}

/* =========================
   Works list
========================= */
.works ul {
  display: block;
}

.works ul li {
  margin: 80px 0;
}

/* =========================
   Interior work section
========================= */
.Interior-work {
  background-color: #0075c9;
  color: #fff;
  padding: 50px 0;
}

.Interior-work .ba__category {
  background-color: #fff;
  color: #0075c9;
}

.Interior-work .ba__catch,
.Interior-work .ba__desc {
  color: #fff;
}

.Interior-work .ba__line {
  border-top: 1px solid #fff;
}

/* =========================
   Company
========================= */
.company {
  display: flex;
}

.company h2 {
  margin: 0 auto 30px;
}

.company .company-text {
  width: 50%;
  padding: 100px 0;
}

.company .google-map {
  width: 50%;
}

.company .google-map iframe {
  width: 100%;
  height: 100%;
}

.company ul {
  display: block;
}

.company-list {
  width: min(820px, 90%);
  margin: 0 auto;
}

.company-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: center;
  font-size: 15px;
  padding: 20px 10px;
  border-bottom: 1px solid #d8d8d8;
}

.company-row dt {
  color: #1b2f6b;
  font-weight: 600;
}

.company-row dd {
  margin: 0;
}

.company-row address {
  font-style: normal;
}

.company a {
  color: blue;
}

/* =========================
   works-title（最低限）
========================= */
.works-title {
  margin: 0 0 18px;
}

.works-title h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.works-title span {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #666;
}

/* =========================
   Before/After 全体
========================= */
.ba {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);

  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}

.ba__head {
  width: 95%;
  margin: 0 auto 18px;
}

.ba__category {
  display: inline-block;
  margin: 0 0 12px;
  padding: 10px 34px;
  background: #2f6fb3;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.ba__catch {
  margin: 0;
  color: #2f6fb3;
  font-size: 18px;
  font-weight: 700;
}

.ba__line {
  width: min(680px, 92%);
  margin: 14px 0 12px;
  border: none;
  border-top: 1px solid #222;
  opacity: 0.55;
}

.ba__desc {
  margin: 0;
  font-size: 13px;
  color: #666;
}

/* =========================
   画像2枚並び
========================= */
.ba__grid {
  display: flex;
  gap: 0;
  align-items: stretch;
  width: 100%;
}

.ba__card {
  position: relative;
  overflow: hidden;
  flex: 1 1 0;
  min-width: 0;
}

.ba__card.is-before {
  --tri: #2b2b2b;
}

.ba__card.is-after {
  --tri: #2f6fb3;
}

.Interior-work .ba__card.is-after {
  --tri: #fff;
}

/* 画像をカード幅いっぱいにする */
.ba__card img {
  display: block;
  width: 100%;
  height: auto;
}

/* 三角の塗り（外側） */
.ba__badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: var(--tri);
  z-index: 2;

  -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

/* 枠線SVG */
.ba__badge-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ba__badge-frame path {
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: miter;
  stroke-linecap: square;
}

/* 文字 */
.ba__badge-text {
  position: absolute;
  top: 50px;
  right: 30px;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
  white-space: nowrap;
  z-index: 3;
  pointer-events: none;
}

.Interior-work .ba__badge-text {
  color: #0075c9;
}

.Interior-work .ba__badge-frame path {
  stroke: #0075c9;
}

/* =========================
   Contact
========================= */
.contact {
  background-color: #0075c9;
  color: #fff;
  padding: 50px 0;
  text-align: center;
}

.contact h3 {
  font-size: 24px;
  letter-spacing: 3px;
  font-weight: inherit;
}

.contact h4 {
  border: 1px solid #fff;
  padding: 10px 40px;
  letter-spacing: 5px;
  display: inline-block;
}

/* =========================
   Footer
========================= */
footer {
  background-color: #dce1ef;
  color: #485881;
}

footer ul {
  justify-content: center;
  display: flex;
  padding: 0;
  margin: 0;
  list-style: none;
  gap: 20px;
  padding: 10px 10px;
}

footer .footer-line {
  width: 100%;
  height: 1px;
  background-color: #485881;
}

footer small {
  display: block;
  padding: 10px 10px;
}

/* =========================
   Interior work section（旧Interior-work と新interior-work 両対応）
========================= */
.interior-work,
.Interior-work {
  background-color: #0075c9;
  color: #fff;
  padding: 50px 0;
}

.interior-work .ba__category,
.Interior-work .ba__category {
  background-color: #fff;
  color: #0075c9;
}

.interior-work .ba__catch,
.interior-work .ba__desc,
.Interior-work .ba__catch,
.Interior-work .ba__desc {
  color: #fff;
}

.interior-work .ba__line,
.Interior-work .ba__line {
  border-top: 1px solid #fff;
}

/* Afterの三角を白に（室内だけ） */
.interior-work .ba__card.is-after,
.Interior-work .ba__card.is-after {
  --tri: #fff;
}

/* 室内だけ文字色を青に */
.interior-work .ba__badge-text,
.Interior-work .ba__badge-text {
  color: #0075c9;
}

/* 室内だけ枠線（pathのstroke）を青に */
.interior-work .ba__badge-frame path,
.Interior-work .ba__badge-frame path {
  stroke: #0075c9;
}

/* =========================
   Responsive（〜767px：スマホ）
========================= */
@media (max-width: 767px) {

  /* ---- Header（スマホ：ロゴ左、ボタン右） ---- */
  header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
  }

  header h1 {
    padding: 0;
    font-size: 18px;
    line-height: 22px;
  }

  header h1 span {
    font-size: 12px;
  }

  /* ナビ全体を右寄せ */
  .site-nav {
    margin-left: auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }

  /* PCの横並びは、SPでは隠す（剥き出し防止） */
  header nav ul {
    display: none;
  }

  /* ハンバーガー：表示 */
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    border: 1px solid #d8d8d8;
    background: #fff;
    border-radius: 8px;
    padding: 0;
    cursor: pointer;
  }

  .nav-toggle__bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #2f6fb3;
    margin: 0 auto;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  /* SPメニュー（押したら出る） */
  .site-nav__list {
    display: none; /* 初期は隠す */
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: min(320px, 86vw);
    background: #fff;
    border: 1px solid #d8d8d8;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    flex-direction: column;
    gap: 2px;
    z-index: 9999;
  }

  .site-nav__list li {
    padding: 0;
    font-size: 14px;
    letter-spacing: 1px;
  }

  .site-nav__list a {
    display: block;
    padding: 12px 12px;
    color: inherit;
    text-decoration: none;
  }

  /* PC用の最後だけ青背景は、SPでは解除 */
  header .site-nav__list li:last-child {
    background-color: transparent;
    color: inherit;
    height: auto;
  }

  /* 開いた状態（JSで .is-open を付与） */
  .site-nav.is-open .site-nav__list {
    display: flex;
  }

  /* ボタンを×に */
  .site-nav.is-open .nav-toggle__bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .site-nav.is-open .nav-toggle__bar:nth-child(2) {
    opacity: 0;
  }

  .site-nav.is-open .nav-toggle__bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* ---- Main（FV）---- */
  main {
    height: 75vh;
  }

  main .top-visual {
    padding: 170px 0 0 0;
    line-height: 46px;
  }

  main .top-visual h1 {
    font-size: 42px;
    text-decoration: 3px underline #fff;
    text-underline-offset: 8px;
  }

  main .top-visual span {
    font-size: 14px;
  }

  /* ---- About ---- */
  .about {
    width: 90%;
    padding: 40px 0;
    font-size: 14px;
    line-height: 28px;
  }

  .about h2 {
    font-size: 24px;
    margin: 30px auto 30px auto;
  }

  /* ---- Section titles ---- */
  .service h2,
  .works h2,
  .company h2,
  .contact h2 {
    font-size: 24px;
    line-height: 28px;
  }

  /* ---- Service ---- */
  .service ul {
    width: 92%;
  }

  .service ul li {
    flex-direction: column;
    gap: 14px;
    margin: 40px 0;
  }

  /* 特定のliだけ逆順（画像が下） */
  .service ul li.column-re {
    flex-direction: column-reverse;
  }

  .service ul li .service-text {
    width: 100%;
  }

  /* 画像の入れ物を100% */
  .service ul li .img {
    width: 100%;
  }

  /* 画像自体も100% */
  .service ul li .img img {
    display: block;
    width: 100%;
    height: auto;
  }

  .service ul li h2 {
    font-size: 18px;
  }

  /* ---- Works（Before/After）---- */
  .ba {
    padding-left: 16px;
    padding-right: 16px;
  }

  .ba__head {
    width: 100%;
  }

  .ba__category {
    padding: 8px 18px;
    font-size: 12px;
  }

  .ba__catch {
    font-size: 16px;
    line-height: 1.5;
  }

  .ba__desc {
    font-size: 12px;
    line-height: 1.8;
  }

  /* SPは縦積み */
  .ba__grid {
    display: block;
  }

  /* 画像は常に幅いっぱい（autoにしない） */
  .ba__card img {
    width: 100%;
    height: auto;
  }

  /* 三角バッジを小さく */
  .ba__badge {
    width: 130px;
    height: 130px;
  }

  .ba__badge-text {
    top: 30px;
    right: 18px;
    font-size: 18px;
  }

  /* ---- Interior（命名揺れに両対応）---- */
  .interior-work,
  .Interior-work {
    padding: 40px 0;
  }

  /* ---- Company ---- */
  .company {
    flex-direction: column;
  }

  .company .company-list {
    width: 95%;
    margin: 0 auto;
  }

  .company .company-text {
    width: 100%;
    padding: 50px 0 30px;
  }

  .company .google-map {
    width: 100%;
  }

  .company .google-map iframe {
    height: 220px;
  }

  .company-row {
    display: block;
    font-size: 15px;
    padding: 14px 8px;
  }

  .company-row dt {
    margin: 0 0 5px;
  }

  /* ---- Contact ---- */
  .contact {
    padding: 30px 0;
  }

  .contact h3 {
    font-size: 18px;
    letter-spacing: 2px;
    margin: 0;
  }

  .contact h4 {
    margin: 10px auto;
    padding: 10px 15px;
    letter-spacing: 1px;
  }

  /* ---- Footer ---- */
  footer ul {
    padding: 20px 0;
    text-align: center;
    line-height: 30px;
    font-size: 13px;
    gap: 10px 14px;
    display: block;
  }

  footer small {
    font-size: 10px;
    padding: 5px 5px;
  }
}
