@charset "utf-8";

.top-page {
  overflow: hidden;
}

/* フロントは body に余白がないため、MV 上端にヘッダー分（実測・スクロールで縮めない） */
body.front-page main.top-page > .top-mv {
  padding-top: var(--site-header-below, 93px);
  box-sizing: border-box;
}

body.admin-bar.front-page main.top-page > .top-mv {
  padding-top: calc(
    var(--site-header-below, 93px) + var(--wp-admin--admin-bar--height, 32px)
  );
}

.top-mv {
  background-size: cover;
  background-position: top;
  position: relative;
  z-index: -2;
}

.top-mv::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.4) 0 42%,
    rgba(0, 0, 0, 0.05) 68%,
    rgba(0, 0, 0, 0) 100%
  );
  z-index: -1;
}

.top-mv .top-mv__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.top-mv__sub {
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-white);
}

.top-mv__title {
  color: #ffd44c;
  font-weight: 900;
  line-height: 1.5;
}

.top-mv__lead {
  margin-top: 16px;
  font-weight: 700;
  color: var(--color-white);
}

.top-mv .c-btn {
  margin-top: 16px;
 width: fit-content;
}
.top-heading {
  position: relative;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #553115;
}

.top-heading::before,
.top-heading::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 32%;
  border-top: 2px solid #b68f72;
}

.top-heading::before {
  left: 0;
}

.top-heading::after {
  right: 0;
}

.top-grid {
  display: grid;
  gap: 20px;
}

.top-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.top-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.top-card,
.top-service-card {
  background: #fff;
  border: 1px solid #d8c5b2;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
  max-width: 350px;
}

.top-card img,
.top-service-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 573 / 383;
}

.top-card h3,
.top-service-card p {
  background: #ea7508;
  color: #fff;
  padding: 12px 10px;
  text-align: center;
  font-weight: 700;
  line-height: 1.2;
}

.top-card p {
  background: transparent;
  color: #3e301f;
  padding: 14px 14px 18px;
  text-align: center;
}

.top-flow-lead {
  text-align: center;
}

.top-flow-list {
  display: grid;
  gap: 12px;
}

.top-flow-item {
  display: grid;
  grid-template-columns: 84px minmax(140px, 220px) 1fr;
  align-items: center;
  background: #fff;
  position: relative;
  min-height: 72px;
  border: 1px solid #d8d8d8;
  gap: 16px;
}

.top-flow-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 42px;
  bottom: -9px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 9px solid var(--color-primary);
}

.top-flow-item__num {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
}

.top-flow-item__title {
  font-weight: 700;
}

.top-flow-item__text {
  padding: 12px 16px 12px 0;
}

.top-price-lead {
  text-align: center;
}

.top-price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.top-price-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.top-price-card__head {
  padding: 22px 18px 40px;
  color: #fff;
  text-align: center;
  background: linear-gradient(135deg, #ffaf59 0%, #ef6902 65%, #c95500 100%);
  border-bottom-left-radius: 52% 28px;
  border-bottom-right-radius: 52% 28px;
}

.top-price-card__label {
  opacity: 0.95;
}

.top-price-card__name {
  margin-top: 6px;
}

.top-price-card__price {
  margin-top: 34px;
  text-align: center;
  color: #393939;
}

.top-price-card__price strong {
  line-height: 1;
}

.top-price-card__price span {
  margin-left: 6px;
}

.top-price-card__note {
  margin: 20px 14px 18px;
  border-radius: 999px;
  padding: 8px 10px;
  text-align: center;
  background: #f8f8f8;
}

.top-news {
  background: var(--color-white);
}

.top-news-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #d8d2c8;
  padding-bottom: 16px;
}

.top-news-title {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
}

.top-news-title span {
  color: #a5a09a;
}

.top-news-more {
  display: inline-flex;
  align-items: center;
    gap: 8px;
  }
  .top-news-more:hover{
    color: var(--color-primary);
  }
.top-news-more::after {
  content: "";
  width: 28px;
  border-top: 2px solid var(--color-primary);
}

.top-news-list {
  margin-top: 10px;
  border-top: 0;
  background: transparent;
}

.top-news-item {
  display: grid;
  grid-template-columns: 140px 180px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid #d8d2c8;
}

.top-news-item__cat {
  display: inline-block;
  align-self: center;
  justify-self: start;
  min-width: 110px;
  padding: 2px 14px;
  border-radius: 999px;
  background: var(--color-white);
  text-align: center;
  border: 1px solid #d8d2c8;
}

.top-news-empty {
  text-align: center;
  padding-top: 20px;
}

@media screen and (max-width: 900px) {
  .top-mv {
    background-position: center;
  }

  .top-mv .top-inner {
    padding-top: clamp(56px, 12vw, 100px);
    padding-bottom: clamp(56px, 12vw, 100px);
  }

  .top-grid--3,
  .top-grid--4 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .top-card,
  .top-service-card {
    margin-left: auto;
    margin-right: auto;
  }
  .top-flow-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .top-flow-item:not(:last-child)::after {
    left: 50%;
    transform: translateX(-50%);
  }
  .top-flow-item__num {
    width: 100%;
    font-size: 26px;
  }
  .top-flow-item__text {
    padding: 0 12px 12px;
  }
  .top-price-grid {
    gap: 8px;
  }
  .top-price-card__head {
    padding: 16px 12px 20px;
  }
  .top-price-card__name,
  .top-price-card__price {
    font-size: clamp(16px, 16px + 20 * (100vw - 375px) / 905, 36px);
  }
  .top-price-card__price {
    margin-top: 20px;
  }
  .top-price-card__note {
    margin: 12px;
    border-radius: 15px;
  }
  .top-news-item {
    grid-template-columns: 116px 140px 1fr;
    gap: 10px;
  }
}

@media screen and (max-width: 640px) {
  .top-mv .top-inner {
    padding-top: clamp(40px, 14vw, 72px);
    padding-bottom: clamp(40px, 14vw, 72px);
  }

  .top-mv__sub .fs40 {
    display: inline;
  }

  .top-mv__lead {
    font-size: 12px;
    padding-top: 0;
  }
  .top-mv .c-btn{
    margin-top: 12px;
  }
  .top-heading::before,
  .top-heading::after {
    width: 18%;
  }
  .top-price-grid {
    grid-template-columns: 1fr;
    gap:12px;
  }
  .top-price-card__name {
    font-size: 20px;
  }
  .top-price-card__price {
    font-size: 24px;
  }

  .top-news-item {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 6px;
    align-items: center;
    padding: 14px 0;
  }

  .top-news-item > time {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  .top-news-item__cat {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    min-width: 0;
    width: fit-content;
    margin: 0;
    align-self: center;
    font-size: 12px;
  }

  .top-news-item__title {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
  }

  .top-news-head {
    align-items: flex-end;
    padding-bottom: 12px;
  }

  .top-news-title {
    gap: 10px;
  }

  .top-news-more::after {
    width: 20px;
  }
}

/* 作業の流れリストだけフェードインを速め＆短距離に */
.top-flow-list .js-fadein {
  --fadein-duration: 600ms;
  --fadein-distance: 16px;
}
