@charset "UTF-8";
/* =========================================================
   front-page.css  —  トップページ専用
   Hero / Problem / Solution
   モバイルファースト
   ========================================================= */

/* =========================================================
   共通：セクション見出し
   ========================================================= */
.sec-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sec-head--light .en-label,
.en-label--light {
  color: var(--c-white);
}

.sec-title--light {
  color: var(--c-white);
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  padding: 10px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 10px;
  right: 10px;
  border-radius: var(--radius);
  overflow: hidden;
}

/* 写真レイヤー（フィルターはここだけに適用） */
.hero__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("../images/hero.png") center / cover no-repeat;
  filter: brightness(0.9) contrast(1.06) saturate(1.05);
}

/* 薄いブラックのマスク */
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.32);
}

/* ロゴモチーフ（緑のジグザグ／カードの両端まで届く・角丸でクリップ） */
.hero__motif {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  width: 100%;
  height: auto;
  opacity: 0.9;
  pointer-events: none;
}

.hero__body {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;                        /* コピーを上下中央 */
  min-height: 400px;                          /* スマホの高さを抑える */
  /* 上下対称パディングにしてコピーをヒーローの上下中央に（ヘッダー分もクリア） */
  padding-block: calc(var(--header-h) + 8px);
  padding-inline: 24px;                       /* スマホの左右余白を少し広めに */
}

.hero__copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 663px;
}

.hero__catch {
  font-family: var(--f-serif);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--c-white);
  text-shadow: 0 8px 34px rgba(0, 0, 0, 0.28);
}

.hero__lead {
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.85;
  color: var(--c-white);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* スマホは短縮版、PCはフル版のリード文を表示 */
.hero__lead-pc {
  display: none;
}

/* スクロールインジケーター（heroに対して right 指定・中央右） */
.hero__scroll {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.hero__scroll-text {
  font-family: var(--f-en);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  color: var(--c-white);
  writing-mode: vertical-rl;
}

.hero__scroll-line {
  position: relative;
  width: 1px;
  height: 70px;
  background: rgba(255, 255, 255, 0.35);
}

.hero__scroll-dot {
  position: absolute;
  top: 0;
  left: 50%;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: var(--c-white);
  animation: scroll-dot 2.4s var(--ease-inout) infinite;
}

@keyframes scroll-dot {
  0% { transform: translateY(-4px); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(64px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__scroll-dot { animation: none; }
}

/* 流れる英字（ヒーロー）／底辺を hero__body と揃える */
.marquee {
  position: absolute;
  left: 0;
  bottom: 12px;
  z-index: 2;
  display: block;
  width: 100%;
  font-family: var(--f-en);
  font-size: clamp(3rem, 6.7vw, 11rem);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.92);
  pointer-events: none;
  overflow: hidden;
}

.hero .marquee {
  font-size: clamp(2.4rem, 5.7vw, 9.4rem);
}

@media (min-width: 768px) {
  .hero {
    padding: 20px;
  }
  .hero__bg {
    top: 20px;
    bottom: 20px;
    left: 20px;
    right: 20px;
  }
  .marquee {
    bottom: 20px;
  }
  .hero__body {
    min-height: 720px;
    /* 上下対称パディングでコピーを上下中央に（ヘッダー分をクリアしつつ中央寄せ） */
    padding-block: calc(var(--header-h) + 20px);
    /* PCはコピーを左寄せに（中央寄せの列にせず、左側の一定余白で配置） */
    max-width: none;
    margin-inline: 0;
    padding-inline: 60px;
  }
  .hero__catch {
    /* 画面幅に応じて可変（1300前後で大きすぎないように）。最大6rem */
    font-size: clamp(3.8rem, 4.2vw, 6rem);
    line-height: 1.33;
    letter-spacing: 0.13em;
  }
  .hero__lead {
    font-size: 1.6rem;
    line-height: 1.9;
    max-width: 663px;
  }
  .hero__lead-sp {
    display: none;
  }
  .hero__lead-pc {
    display: inline;
  }
  .hero__scroll {
    display: flex;
  }
}

/* =========================================================
   Problem
   ========================================================= */
.problem {
  position: relative;
  padding: 64px 0 80px;
  background: var(--c-white);
  overflow: hidden;
}

/* 背景ロゴ（ヒーローと同じジグザグ形状・見切れない） */
/* 底のV字の頂点を次セクション（ソリューション）の上端に合わせる */
.problem__motif {
  position: absolute;
  z-index: 0;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100vw;
  height: auto;
  opacity: 0.05;
  pointer-events: none;
}

/* 左右余白は .inner のデフォルト（20px）をそのまま使う＝サイト全体の基準 */
.problem > .inner {
  position: relative;
  z-index: 1;
}

.problem .sec-head {
  margin-bottom: 40px;
}

.trouble {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.trouble__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 24px;
  text-align: center;
  background: var(--c-white);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.trouble__no {
  font-family: var(--f-en);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-primary);
}

.trouble__title {
  margin-top: 6px;
  font-size: 2rem;
  font-weight: 900;
  color: var(--c-primary);
}

.trouble__img {
  width: 200px;
  margin: 18px 0;
}

.trouble__text {
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--c-text);
}

/* 根本原因 */
.root-cause {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 40px;
  text-align: center;
}

/* 縦ライン＋ドット（最前面／スクロールでスーッと下に伸びてbadgeに到達） */
.root-cause__connector {
  position: relative;
  z-index: 5;
  width: 2px;
  height: 50px;
}

/* 伸びるライン */
.root-cause__connector::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--c-primary);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.9s var(--ease-inout);
}

/* 先端のドット（ライン到達後にポップ） */
.root-cause__connector::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 11px;
  height: 11px;
  transform: translateX(-50%) scale(0);
  background: var(--c-primary);
  border-radius: 50%;
  transition: transform 0.35s var(--ease) 0.75s;
}

.root-cause.is-visible .root-cause__connector::before {
  transform: scaleY(1);
}

.root-cause.is-visible .root-cause__connector::after {
  transform: translateX(-50%) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .root-cause__connector::before { transform: scaleY(1); transition: none; }
  .root-cause__connector::after { transform: translateX(-50%) scale(1); transition: none; }
}

.root-cause__banner-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 700px;
}

/* 円形バッジ（バナーの背面に。上端がconnectorの頂点と一致） */
.root-cause__badge {
  position: relative;
  z-index: 0;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin-bottom: -44px;
  padding-bottom: 26px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--c-primary-accent);
  background: var(--c-white);
  border: 1.5px solid var(--c-primary);
  border-radius: 50%;
}

.root-cause__banner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 22px 10px;
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: 0.03em;
  white-space: nowrap; /* スマホでも1行（改行させない） */
  color: var(--c-white);
  background: var(--grad-green-r);
}

.root-cause__icon {
  flex: none;
  width: 30px;
  height: 27px;
}

.root-cause__text {
  margin-top: 24px;
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.9;
  color: var(--c-text);
}

@media (min-width: 768px) {
  .problem {
    padding: 100px 0 120px;
  }
  .problem .sec-head {
    margin-bottom: 56px;
  }
  .trouble {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
  .trouble__card {
    padding: 40px 30px 44px;
  }
  .trouble__title {
    font-size: 2.4rem;
  }
  .trouble__img {
    width: 280px;
    margin: 26px 0 30px;
  }
  .trouble__text {
    font-size: 1.6rem;
  }
  .root-cause {
    margin-top: 64px;
  }
  .root-cause__connector {
    height: 64px;
  }
  .root-cause__badge {
    width: 108px;
    height: 108px;
    padding-bottom: 32px;
    font-size: 1.4rem;
    margin-bottom: -52px;
  }
  .root-cause__banner {
    gap: 16px;
    padding: 26px 40px;
    font-size: 3rem;
    white-space: nowrap;
  }
  .root-cause__icon {
    width: 35px;
    height: 31px;
  }
  .root-cause__text {
    margin-top: 30px;
    font-size: 1.6rem;
  }
}

/* =========================================================
   Solution
   ========================================================= */
.solution {
  position: relative;
  padding: 0 0 64px;
  background: var(--c-bg-gray);
}

/* ソリューションは全幅カード＝例外。カードの左右余白はヒーローカードと同じ狭さにする
   （.inner のデフォルト20pxではなくSP10px） */
.solution .inner {
  max-width: none;
  padding-inline: 10px;
}

/* ソリューションアウター：緑カードは全幅（ヒーローアウター・フッターと幅が揃う） */
.solution__card {
  position: relative;
  padding: 48px 24px;
  background: var(--grad-green);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ソリューションインナー：カード内で中央寄せ。
   幅は共通変数 --inner-w（プロブレム／ヒーローインナーと統一）。 */
.solution__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--inner-w);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* 背面の大きいロゴ（円形エンブレム／左側は見切れる・cardいっぱい・paddingの影響を受けない） */
.solution__motif {
  position: absolute;
  z-index: 0;
  left: -90px;
  top: 50%;
  transform: translateY(-50%);
  width: 300px;
  height: auto;
  opacity: 0.15;
  pointer-events: none;
}

@media (min-width: 768px) {
  .solution__motif {
    left: -150px;
    width: 540px;
  }
}

.solution__body,
.solution__media,
.solution__coverage {
  position: relative;
  z-index: 1;
}

.solution__body {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.solution__text {
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.9;
  color: var(--c-white);
}

.solution__banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--c-primary-accent);
  background: var(--c-white);
}

.solution__banner-icon {
  flex: none;
  width: 28px;
  height: 28px;
}

/* 施工写真 + 保証書（スマホでは非表示） */
.solution__media {
  position: relative;
  display: none;
  justify-content: center;
  gap: 16px;
}

.solution__photo {
  width: 60%;
  max-width: 387px;
  aspect-ratio: 387 / 456;
  object-fit: cover;
  border-radius: var(--radius);
}

.solution__cert {
  width: 40%;
  max-width: 200px;
  height: fit-content;
  align-self: center;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* 写真2枚をスクロールで時間差フェードイン */
.solution__photo,
.solution__cert {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-inout), transform 0.8s var(--ease-inout);
}

.solution__media.is-visible .solution__photo {
  opacity: 1;
  transform: none;
}

.solution__media.is-visible .solution__cert {
  opacity: 1;
  transform: none;
  transition-delay: 0.3s;
}

@media (prefers-reduced-motion: reduce) {
  .solution__photo,
  .solution__cert {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* 保証適用リスト */
.solution__coverage {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.solution__coverage-title {
  font-size: 2rem;
  font-weight: 900;
  color: var(--c-white);
}

.coverage-list {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  background: var(--c-white);
  border: 1px solid var(--c-border-green);
  border-radius: var(--radius-sm);
  box-shadow: 0 24px 30px rgba(16, 58, 37, 0.12);
}

.coverage-list__item {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--c-border);
}

.coverage-list__item:last-child {
  border-bottom: none;
}

.coverage-list__name {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--c-text);
}

/* 各保証項目のアイコンは写真（円形にクロップ） */
.coverage-list__icon {
  flex: none;
  overflow: hidden;
  width: 46px;
  height: 46px;
  background: var(--c-bg-gray);
  border-radius: 50%;
}

.coverage-list__icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.solution__note {
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--c-white);
  text-align: center;
}

@media (min-width: 768px) {
  .solution {
    padding: 0 0 90px;
  }
  .solution .inner {
    padding-inline: 20px; /* PCはヒーローカードと同じ20px */
  }
  .solution__card {
    /* 左右のpaddingは0：インナー（最大1400px中央寄せ）が余白をつくる */
    padding: 94px 0 64px;
  }
  .solution__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "body  media"
      "cover cover";
    column-gap: 40px;
    row-gap: 50px;
  }
  .solution__body {
    grid-area: body;
    gap: 28px;
    max-width: 552px;
  }
  .solution__text {
    font-size: 1.6rem;
    line-height: 2.25;
  }
  .solution__banner {
    font-size: 1.5rem;
    padding: 20px 30px;
  }
  .solution__media {
    display: flex;
    grid-area: media;
    align-self: start;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    margin-top: -46px;
    margin-left: -20px;
    padding-right: 0;
  }
  .solution__photo {
    width: 387px;
  }
  .solution__cert {
    position: absolute;
    right: -20px;
    top: 190px;
    width: 258px;
    max-width: none;
  }
  .solution__coverage {
    grid-area: cover;
    gap: 30px;
  }
  .solution__coverage-title {
    font-size: clamp(2.2rem, 2.1vw, 3rem);
  }
  .coverage-list {
    grid-template-columns: repeat(5, 1fr);
  }
  .coverage-list__item {
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding: 26px 12px;
    border-right: 1px solid var(--c-border);
    border-bottom: none;
  }
  .coverage-list__item:last-child {
    border-right: none;
  }
  .coverage-list__name {
    font-size: 1.8rem;
  }
  .coverage-list__icon {
    width: 93px;
    height: 93px;
  }
  .solution__note {
    font-size: 1.3rem;
    text-align: center;
  }
}
