@import url("../_shared/case.css?v=20260902-light1");

/* この事例の雨水排水解説だけに適用。既存写真・共通レイアウトは変更しない。 */
#rainwater-upgrade { scroll-margin-top: 100px; }
#rainwater-upgrade p { color: #17263a; font-weight: 700; }
#rainwater-upgrade .rainwater-topic { margin-top: 32px; }
#rainwater-upgrade .rainwater-compare,
#rainwater-upgrade .rainwater-photos { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin-top: 18px; }
#rainwater-upgrade .rainwater-card { padding: 22px; border: 1px solid #d8c9ad; border-top: 4px solid #675f55; border-radius: 8px; background: #fffdf7; min-width: 0; }
#rainwater-upgrade .rainwater-card:nth-child(2) { border-top-color: #9b6a24; }
#rainwater-upgrade h3 { color: #17263a; font-weight: 800; }
#rainwater-upgrade h4 { margin: 0 0 12px; color: #17263a; font-size: 1.1rem; font-weight: 800; }
#rainwater-upgrade .rainwater-card p { margin: 0; }
#rainwater-upgrade .rainwater-condition { margin: 24px 0; padding: 22px; border-left: 5px solid #9b6a24; background: #f3eadb; }
#rainwater-upgrade .rainwater-photo-title { margin-top: 34px; }
#rainwater-upgrade .photo-card { margin: 0; min-width: 0; background: #fffdf7; }
#rainwater-upgrade .photo-button { width: 100%; padding: 0; background: #fffdf7; }
#rainwater-upgrade .photo-button img { display: block; width: 100%; height: auto; aspect-ratio: 4/3; object-fit: contain; }
#rainwater-upgrade figcaption { color: #17263a; font-weight: 800; }
#rainwater-upgrade .rainwater-sources { margin-top: 30px; padding-top: 22px; border-top: 1px solid #d8c9ad; }
#rainwater-upgrade .rainwater-source-link { display: inline-block; padding: 10px 0; color: #17263a; text-underline-offset: .2em; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  #rainwater-upgrade .rainwater-compare,
  #rainwater-upgrade .rainwater-photos { grid-template-columns: minmax(0,1fr); }
  #rainwater-upgrade .rainwater-card,
  #rainwater-upgrade .rainwater-condition { padding: 18px; }
}

/*
 * 古田紙工様の工場内装から採った、この事例だけの配色。
 * 生成り・木肌・黄土・濃紺・赤錆・金属グレーを、写真が主役になる量で使う。
 */
:root {
  --yellow: #c99a2e;
  --yellow-deep: #9b6a24;
  --ink: #17263a;
  --ink-soft: #344252;
  --paper: #fffdf7;
  --mist: #f3eadb;
  --line: #d8c9ad;
  --muted: #675f55;
  --shadow: 0 18px 52px rgba(71, 52, 31, .14);
}

.site-header {
  background: rgba(23, 38, 58, .97);
}

/*
 * 公開中トップの相談ビジュアルだけを再利用する導入部。
 * 見出しは増やさず、寸法を固定してレイアウト移動を防ぐ。
 */
.case-prehero {
  width: calc(100% - clamp(24px, 3.2vw, 48px));
  max-width: 1480px;
  margin: clamp(8px, 1.2vw, 16px) auto 0;
  overflow: hidden;
  border-radius: 2px;
  background: #fff;
}

.case-prehero img {
  display: block;
  width: 100%;
  height: auto;
}

.hero {
  grid-template-columns: minmax(390px, 45%) minmax(0, 55%);
  min-height: min(720px, 76vh);
  align-items: stretch;
  background: #f4e8cf;
  color: #17263a;
}

.hero > img {
  position: relative;
  inset: auto;
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 100%;
  min-height: min(720px, 76vh);
  object-fit: cover;
  object-position: center;
  filter: saturate(1.05) contrast(1.02);
}

.hero-shade,
.hero::after {
  display: none;
}

.hero::before {
  z-index: 3;
  top: 0;
  left: 0;
  width: 13px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    #17263a 0 22%,
    #c99a2e 22% 48%,
    #a8563e 48% 64%,
    #a97845 64% 83%,
    #f4e8cf 83% 100%
  );
}

.hero-copy {
  position: relative;
  z-index: 2;
  grid-column: 1;
  grid-row: 1;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: auto;
  margin: 0;
  padding: clamp(54px, 6vw, 88px) clamp(32px, 4.6vw, 72px);
  background:
    linear-gradient(145deg, rgba(255, 253, 247, .76), transparent 44%),
    #f4e8cf;
}

.hero-copy::before {
  content: "";
  display: block;
  width: min(220px, 56%);
  height: 12px;
  margin-bottom: 30px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    #17263a 0 20%,
    #c99a2e 20% 45%,
    #a97845 45% 67%,
    #a8563e 67% 82%,
    #fffdf7 82% 100%
  );
  box-shadow: 0 6px 18px rgba(71, 52, 31, .12);
}

.hero h1 {
  max-width: 650px;
  margin: 0;
  color: #17263a;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.25;
  letter-spacing: -.035em;
  text-wrap: auto;
}

.hero h1 .mobile-title-break {
  display: block;
}

.hero-lead {
  max-width: 650px;
  margin-top: 28px;
  padding: 18px 20px;
  border: 1px solid rgba(169, 120, 69, .3);
  border-left: 7px solid #c99a2e;
  border-radius: 0 14px 14px 0;
  background: rgba(255, 253, 247, .92);
  color: #283648;
  box-shadow: 0 14px 34px rgba(71, 52, 31, .09);
  font-size: clamp(15px, 1.45vw, 18px);
  font-weight: 700;
}

.hero-tags {
  gap: 9px;
  margin-top: 24px;
}

.hero-tags span {
  border: 1px solid #b98a3b;
  border-radius: 999px;
  background: #fffdf7;
  color: #17263a;
  font-weight: 800;
  box-shadow: 0 7px 20px rgba(71, 52, 31, .08);
}

.hero-tags span:first-child {
  border-color: #c99a2e;
  background: #c99a2e;
}

.hero-tags span:nth-child(2) {
  border-color: #a8563e;
  background: #a8563e;
  color: #fffdf7;
}

.hero-tags span:nth-child(3) {
  border-color: #8d9aa0;
  background: #e3e2db;
}

/*
 * 28,000pxを超える長編でも現在地を見失わないよう、章の役割を公式色で区切る。
 * 色は見出しとカード上辺に限定し、施工写真より強くしない。
 */
.content-section {
  --section-accent: #c99a2e;
  padding-block: clamp(46px, 6vw, 76px);
}

.hero + .toshin-mascot-guide {
  margin-bottom: 12px;
}

.hero + .toshin-mascot-guide + .page-body {
  padding-top: 0;
  padding-bottom: 24px;
}

.hero + .toshin-mascot-guide + .page-body > .content-section:first-child {
  padding-top: clamp(30px, 4vw, 48px);
}

.page-body > .cta-section:last-child {
  margin-bottom: 22px;
}

.content-section .section-heading {
  padding-left: clamp(16px, 2vw, 24px);
  border-left: 8px solid var(--section-accent);
}

.content-section .section-heading h2 {
  background-image: linear-gradient(transparent 72%, rgba(201, 154, 46, .32) 72%);
}

#safety,
#alc-process {
  --section-accent: #a8563e;
}

#safety .section-heading h2,
#alc-process .section-heading h2 {
  background-image: linear-gradient(transparent 72%, rgba(168, 86, 62, .24) 72%);
}

#customer-voice {
  --section-accent: #a97845;
}

#customer-voice .section-heading h2 {
  background-image: linear-gradient(transparent 72%, rgba(169, 120, 69, .25) 72%);
}

#all-records,
#diagnosis {
  --section-accent: #17263a;
}

#all-records .section-heading h2,
#diagnosis .section-heading h2 {
  background-image: linear-gradient(transparent 72%, rgba(227, 226, 219, .95) 72%);
}

#process .process-item:nth-child(4n + 1) { border-top-color: #c99a2e; }
#process .process-item:nth-child(4n + 2) { border-top-color: #a97845; }
#process .process-item:nth-child(4n + 3) { border-top-color: #a8563e; }
#process .process-item:nth-child(4n) { border-top-color: #17263a; }

#all-records .gallery-group:nth-child(4n + 1) summary { border-left: 8px solid #c99a2e; }
#all-records .gallery-group:nth-child(4n + 2) summary { border-left: 8px solid #a97845; }
#all-records .gallery-group:nth-child(4n + 3) summary { border-left: 8px solid #a8563e; }
#all-records .gallery-group:nth-child(4n) summary { border-left: 8px solid #17263a; }

.toshin-mascot-guide strong,
.toshin-brand-panel__copy h2 {
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
}

.toshin-brand-panel {
  margin-block: clamp(52px, 8vw, 96px);
}

@media (max-width: 900px) {
  .case-prehero {
    width: 100%;
    margin-top: 0;
    border-radius: 0;
  }

  .hero {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .hero > img {
    order: 1;
    width: 100%;
    height: clamp(300px, 48vw, 430px);
    min-height: 0;
  }

  .hero-copy {
    order: 2;
    width: 100%;
    padding: 42px clamp(28px, 7vw, 62px) 48px;
  }

  .hero h1 {
    max-width: 760px;
    font-size: clamp(30px, 4.8vw, 40px);
  }

  .hero-lead {
    max-width: 760px;
  }
}

@media (max-width: 640px) {
  .hero::before {
    width: 8px;
  }

  .hero > img {
    height: clamp(230px, 66vw, 300px);
    object-position: center;
  }

  .hero-copy {
    padding: 30px 22px 36px 28px;
  }

  .hero-copy::before {
    width: 154px;
    height: 10px;
    margin-bottom: 22px;
  }

  .hero h1 {
    font-size: clamp(29px, 8.2vw, 36px);
    line-height: 1.35;
  }

  .hero-lead {
    margin-top: 20px;
    padding: 14px 15px;
    border-left-width: 6px;
    font-size: 15px;
  }

  .hero-tags {
    margin-top: 17px;
  }

  .hero-tags span {
    padding: 7px 10px;
    font-size: 12px;
  }

  .content-section .section-heading {
    padding-left: 15px;
    border-left-width: 6px;
  }
}
