/* ========= リセット ========= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  background: #fff;
  color: #333;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* モバイルでスクロールバーを隠す */
@media (max-width: 768px) {
  html,
  body {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  html::-webkit-scrollbar,
  body::-webkit-scrollbar {
    display: none;
  }
}

/* ========= ヒーローセクション ========= */
.tdsk-hero {
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;

  /* 背景共通 */
  &.index,
  &.renovation,
  &.forbusiness {
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
  }
  &.index {
    background-image: url("./image/head-image_01.webp");
  }
  &.renovation {
    background-image: url("./image/head-image_02.webp");
  }
  &.forbusiness {
    background-image: url("./image/head-image_03.webp");
  }
}

.tdsk-hero-title {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 5px;
  padding: 0.5em 1em;
  @media (max-width: 768px) {
    font-size: 1.65em;
  }
}

/* ========= トップページ（index） ========= */
.full-photo {
  position: relative;
  width: 100%;
  overflow: visible;

  img {
    width: 100%;
  }

  .overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    padding: 7em 0;

    * {
      pointer-events: auto;
    }

    .tdsk-logo {
      max-width: 1117px;
      margin: 0 auto;
      @media (max-width: 768px) {
        padding: 0 1em;
      }
    }
  }
}

.link-button__icon {
  width: 25px !important;
  height: auto !important;
  max-width: none !important;
  flex-shrink: 0 !important;
  transition: transform 0.3s;
  @media (max-width: 768px) {
    width: 18px !important;
  }
}

.link-button:hover .link-button__icon {
  transform: translateX(4px);
}

/* SP/PC 切り替え */
.sp-only {
  display: none;
  @media (max-width: 768px) {
    display: block;
  }
}
.pc-only {
  display: block;
  @media (max-width: 768px) {
    display: none;
  }
}

/* ========= ボタン周り ========= */
.button-group {
  display: flex;
  justify-content: center;
  gap: 100px;
  z-index: 2;
  @media (max-width: 768px) {
    display: block;
  }
}

.link-button {
  position: relative;
  z-index: 2;
  width: 390px;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5em;
  font-size: 1em;
  font-weight: 500;
  text-decoration: none;
  border: none;
  background-color: #2b4c66;
  color: #fff;
  transition: background-color 0.3s;

  @media (max-width: 768px) {
    width: 100%;
  }

  &:hover {
    opacity: 0.8;
  }

  span {
    font-size: 1.55em;
    letter-spacing: 2px;
  }

  &__icon {
    width: 15px !important;
    height: auto !important;
    max-width: none !important;
    flex-shrink: 0 !important;
    transition: transform 0.3s;

    .link-button:hover & {
      transform: translateX(4px);
    }
  }
}

/* ========= イントロダクション ========= */
.tdsk-intro {
  padding: 3em 1em;
  text-align: center;

  .tdsk-intro-inner {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.8;

    > p {
      @media (max-width: 768px) {
        padding: 8px 0;
      }
    }
  }

  .full-photo & .tdsk-intro-inner {
    max-width: 1000px;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 2.5;
  }
}

/* ========= フローチャート ========= */
.tdsk-flow-wrapper,
.tdsk-forbusiness-wrapper {
  position: relative;
  max-width: 1130px;
  margin: 0 auto;
}

.tdsk-flow-section {
  position: relative;
  min-height: 300px;
  padding: 5em 1em;
  overflow: visible;
  z-index: 0;

  @media (max-width: 768px) {
    padding: 3em 1em;
  }

  &::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 100px;
    width: 5px;
    background: #fff;
    z-index: -1;

    @media (max-width: 768px) {
      left: 2.25em;
    }
  }
}

.bg1 {
  background: #d0d1d2;
  clip-path: polygon(0 0, 100% 0, 100% 90%, 50% 100%, 0 90%);
}
.bg2,
.bg5 {
  background: #e7e8e0;
  margin-top: -60px;
  padding-top: 120px;
  position: relative;
  z-index: -1;
}
.bg3 {
  background: #eee6e5;
}
.bg4 {
  background: #e9e5df;
}

.step-title {
  max-width: 880px;
  position: relative;
  left: 18px;
  z-index: 20;
  @media (max-width: 768px) {
    left: -0.5em;
  }
}

.step-item {
  position: relative;
  left: 76.5px;
  max-width: 840px;
  @media (max-width: 768px) {
    left: 1em;
  }

  &.square {
    max-width: 650px;
  }

  img {
    padding: 1.25em 0;
    @media (max-width: 768px) {
      padding-right: 1.25em;
    }
  }
}

.tdsk-flow-content {
  max-width: 740px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.25em;
  line-height: 1.8;
  font-weight: 400;
  color: #2b4c66;

  @media (max-width: 768px) {
    max-width: 300px;
    padding-left: 2em;
  }

  .tdsk-flow-text {
    img {
      padding: 1em 0;
      display: inline-block;
    }
    .caption {
      font-size: 0.625em;
      margin-top: -1.5em;
    }
  }

  .step-title {
    font-size: 1.25em;
    letter-spacing: 3px;
    line-height: 1.8;
    color: #fff;
  }
}

/* ========= 事業用 ========= */
.tdsk-forbusiness-wrapper {
  @media (max-width: 768px) {
    padding: 0 1em;
  }
}
.tdsk-forbusiness-title {
  text-align: center;
  padding: 1.25em 0;
}
.tdsk-forbusiness-title h3 {
  width: 230px;
  background-color: #355968;
  color: #fff;
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 auto 1em;
  text-align: justify;
  -moz-text-align-last: justify;
  text-align-last: justify;
  padding: 0.5em 0.65em;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
}
.tdsk-build {
  margin: 2em 0;
}
.tdsk-build-new-container {
  display: grid;
  grid-template-columns: repeat(3, 345px);
  grid-auto-rows: auto;
  gap: 2em;
  max-width: 1130px;
  margin: 0 auto;
  justify-content: space-between;
  @media (max-width: 768px) {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tdsk-build-demolition-item {
  max-width: 738px;
  margin: 0 auto;
}

.tdsk-build-new-item img {
  display: block;
  width: 100%;
  height: auto;
}

.tdsk-build-demolition-container {
  padding: 1.5em 0;
  margin: 0 auto;
}

.tdsk-build-demolition-container.ba {
  display: flex;
  justify-content: center;
}

.tdsk-build-demolition-container.layout {
  display: grid;
  grid-template-columns: repeat(2, 345px);
  gap: 47px;
  max-width: 737px;
  align-items: start;
  @media (max-width: 768px) {
    display: block;
  }
}

.tdsk-build-demolition-item {
  @media (max-width: 7868px) {
    margin: 0.75em 0;
  }
}

.tdsk-build-demolition-item.left figure,
.tdsk-build-demolition-item.right figure {
  margin: 0;
}

.tdsk-build-demolition-item.left {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.tdsk-build-demolition-item.right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

.caption-title {
  display: block;
  border-bottom: 2px solid #000;
  font-weight: bold;
  margin-bottom: 0.5em;
}

.tdsk-build-demolition-item figcaption .caption-text {
  text-align: left;
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0;
  color: #333;
}

.tdsk-build-new-item figure,
.tdsk-build-demolition-item figure {
  margin: 0;
  text-align: center;
}

.tdsk-build-new-item figcaption,
.tdsk-build-demolition-item figcaption {
  font-size: 0.875rem;
  color: #666;
  margin-top: 0.5em;
  line-height: 1.4;
  @media (max-width: 768px) {
    font-size: 0.875rem;
    margin-top: 0.5em;
    padding: 0 0.5em;
  }
}

.tdsk-build-demolition-item.right figure.guarantee {
  @media (max-width: 768px) {
    padding: 0.75em 0;
  }
}
