@charset "utf-8";

:root {
  --works-red: #c90010;
  --works-ink: #252525;
  --works-line: #dedede;
  --works-width: 1180px;
  --works-mincho: "A-OTF 教科書ICA Pro", "リュウミン R-KL", "游明朝", YuMincho,
    "ヒラギノ明朝 ProN W3", "Hiragino Mincho ProN", serif;
  --works-gothic: "游ゴシック体", YuGothic, "游ゴシック", "Yu Gothic",
    "ヒラギノ角ゴ ProN W3", Meiryo, sans-serif;
}

.works-page {
  color: var(--works-ink);
  font-family: var(--works-gothic);
}

.works-container {
  width: min(calc(100% - 48px), var(--works-width));
  margin-inline: auto;
}

.works-hero {
  position: relative;
  min-height: 510px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #f5f6f6;
  /* 写真を用意したら、このパスの画像を差し替えます。 */
  background-image: linear-gradient(90deg, #fff 4%, rgba(255,255,255,.98) 29%, rgba(255,255,255,.78) 45%, rgba(255,255,255,0) 70%), url("../images/works/works-hero.png");
  background-position: center, center right;
  background-size: cover;
}

.works-hero__inner {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 48px), var(--works-width));
  margin-inline: auto;
  padding-block: 64px;
}

main.works-page p.works-eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 20px;
  color: var(--works-red);
  font-family: Arial, sans-serif;
  font-size: 14px !important;
  font-weight: 700;
  letter-spacing: .17em;
}

.works-eyebrow::after {
  display: block;
  width: 34px;
  height: 2px;
  background: currentColor;
  content: "";
}

main.works-page .works-hero h1 {
  margin: 0;
  font-family: var(--works-mincho);
  font-size: 64px !important;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: .1em;
}

main.works-page p.works-hero__lead {
  margin: 28px 0 0;
  font-family: var(--works-mincho);
  font-size: 32px !important;
  line-height: 1.55;
  letter-spacing: .08em;
}

main.works-page p.works-hero__text {
  margin: 24px 0 0;
  font-size: 18px !important;
  line-height: 1.9;
}

.works-filter {
  padding: 46px 0 26px;
  background: #fff;
}

.works-filter-nav {
  position: sticky;
  top: var(--header-height, 65px);
  z-index: 600;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--works-line);
  background: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .055);
}

main.works-page .works-filter h2 {
  margin: 0 0 28px;
  text-align: center;
  font-family: var(--works-mincho);
  font-size: 36px !important;
  font-weight: 500;
  letter-spacing: .08em;
}

.works-filter__controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--works-line);
}

.works-filter__controls button {
  min-height: 54px;
  padding: 10px 16px;
  border: 0;
  border-right: 1px solid var(--works-line);
  color: var(--works-ink);
  background: #fff;
  font-family: var(--works-gothic);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

.works-filter__controls button:last-child { border-right: 0; }
.works-filter__controls button:hover { background: #f8ebed; }
.works-filter__controls button.is-active,
.works-filter__controls button.is-active:hover { color: #fff; background: var(--works-red); }
.works-filter__controls button:focus-visible { outline: 3px solid var(--works-ink); outline-offset: -5px; }

.works-list { padding: 70px 0 110px; background: #fff; }
.works-list__heading { margin-bottom: 34px; }
main.works-page .works-list__heading h2 {
  margin: 0;
  font-family: var(--works-mincho);
  font-size: 51px !important;
  font-weight: 500;
  letter-spacing: .07em;
}
main.works-page p.works-list__count { margin: 0 0 18px; font-size: 14px !important; color: #666; }

.works-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
}

.work-card { min-width: 0; border: 1px solid #cecece; background: #fff; }
.work-card[hidden] { display: none !important; }
.work-card__comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.work-card__comparison figure { position: relative; min-width: 0; margin: 0; aspect-ratio: 1.35; overflow: hidden; background: #e9ebed; }
.work-card__comparison figure + figure { border-left: 2px solid #fff; }
.work-card__comparison figure + figure::after {
  position: absolute;
  top: 50%;
  left: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--works-ink);
  background: #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,.18);
  content: "›";
  font-size: 23px;
  transform: translate(-50%, -50%);
}
.work-card__comparison img { display: block; width: 100%; height: 100%; object-fit: cover; }
.work-card__comparison figure.is-placeholder::before {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #777;
  background: #e9ebed;
  content: "施工写真を配置";
  font-size: 14px;
}
.work-card__comparison figure.is-placeholder img { display: none; }
.work-card__comparison figcaption { position: absolute; top: 10px; left: 10px; padding: 5px 8px; color: #fff; background: #333; font-family: Arial, sans-serif; font-size: 13px; font-weight: 700; letter-spacing: .05em; }
.work-card__comparison figure + figure figcaption { background: var(--works-red); }
.work-card__body { padding: 18px 20px 22px; }
main.works-page p.work-card__tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 11px; font-size: 13px !important; line-height: 1.4; }
.work-card__tags span { padding: 3px 7px; border: 1px solid #bbb; }
main.works-page .work-card__body h3 { margin: 0 0 8px; font-size: 25px !important; font-weight: 700; line-height: 1.5; }
main.works-page .work-card__body > p:last-child { margin: 0; font-size: 14px !important; line-height: 1.75; }

@media (max-width: 767px) {
  .works-container, .works-hero__inner { width: min(calc(100% - 40px), var(--works-width)); }
  .works-hero { min-height: 420px; background-position: center, 60% center; background-image: linear-gradient(90deg, rgba(255,255,255,.96), rgba(255,255,255,.74)), url("../images/works/works-hero.png"); }
  .works-hero__inner { padding-block: 56px; }
  main.works-page .works-hero h1 { font-size: 36px !important; }
  main.works-page p.works-hero__lead { font-size: 23px !important; }
  main.works-page p.works-hero__text { font-size: 16px !important; }
  .works-filter { padding: 36px 0 22px; }
  .works-filter-nav { padding-bottom: 12px; }
  main.works-page .works-filter h2 { font-size: 32px !important; }
  .works-filter__controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .works-filter__controls button { min-height: 56px; font-size: 14px; }
  .works-filter__controls button:nth-child(2) { border-right: 0; }
  .works-filter__controls button:nth-child(n+3) { border-top: 1px solid var(--works-line); }
  .works-list { padding: 56px 0 76px; }
  main.works-page .works-list__heading h2 { font-size: 32px !important; }
  .works-grid { grid-template-columns: 1fr; gap: 24px; }
  main.works-page .work-card__body h3 { font-size: 23px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .works-filter__controls button { transition: none; }
}
