/* トップページ再構成版。body.home-page-v2 内だけに適用する。 */

body.home-page-v2 {
  --home-navy: #0b3b68;
  --home-navy-deep: #082f55;
  --home-teal: #2b827b;
  --home-text: #18334f;
  --home-muted: #5b6e7f;
  --home-line: #d6e0e8;
  --home-soft: #f4f7f8;
  color: var(--home-text);
  background: #fff;
}

/* 共通CSSのフェード処理が完了しない場合も、TOPを透明のままにしない。 */
html.js body.home-page-v2 {
  opacity: 1 !important;
}

body.home-page-v2 #center.home-main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 !important;
  overflow: visible;
}

body.home-page-v2 .home-shell {
  box-sizing: border-box;
  width: min(1200px, calc(100% - 48px));
  margin-right: auto;
  margin-left: auto;
}

body.home-page-v2 .home-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #193744, #285361);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: #fff;
}

body.home-page-v2 .home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255,255,255,0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.28) 1px, transparent 1px);
  background-size: 54px 54px;
}

body.home-page-v2 .home-hero-inner {
  position: relative;
  z-index: 1;
  padding-top: 62px;
  padding-bottom: 58px;
}

body.home-page-v2 #center .home-hero-title {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font-weight: 700;
  line-height: 1.45;
  text-align: left;
}

body.home-page-v2 #center .home-hero-title::after {
  content: none !important;
}

body.home-page-v2 .home-hero-kicker,
body.home-page-v2 .home-hero-service {
  display: block;
  margin-left: 0;
}

body.home-page-v2 .home-hero-kicker {
  margin-bottom: 15px;
  color: #91d8d0;
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 700;
  letter-spacing: 0.12em;
}

body.home-page-v2 .home-hero-service {
  max-width: 1100px;
  font-size: clamp(28px, 3.2vw, 42px);
  letter-spacing: 0.02em;
}

body.home-page-v2 .home-hero-service-line {
  display: block;
  white-space: nowrap;
}

body.home-page-v2 #center .home-hero-lead {
  max-width: 980px;
  margin: 25px 0 0;
  color: #edf4f5;
  font-size: 17px;
  line-height: 1.9;
}

body.home-page-v2 .home-feature {
  padding: 38px 0 42px;
  border-bottom: 1px solid var(--home-line);
  background: var(--home-soft);
}

/*
 * 再読込時はブラウザが横スクロール位置を復元することがある。
 * 先頭位置の確定前だけ操作対象を隠し、異なるカードが一瞬表示されるのを防ぐ。
 */
html.js body.home-page-v2 .home-feature:not(.is-carousel-ready) .home-feature-viewport,
html.js body.home-page-v2 .home-feature:not(.is-carousel-ready) .home-feature-progress {
  visibility: hidden;
}

body.home-page-v2 .home-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 21px;
  padding-bottom: 12px;
  border-bottom: 1px solid #b8c8d4;
}

body.home-page-v2 #center .home-section-heading h2 {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--home-navy);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.5;
}

body.home-page-v2 .home-feature-controls {
  display: flex;
  gap: 8px;
}

body.home-page-v2 .home-feature-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0 0 3px;
  border: 1px solid #9db2c2;
  border-radius: 50%;
  background: #fff;
  color: var(--home-navy);
  font-size: 29px;
  line-height: 1;
  cursor: pointer;
}

body.home-page-v2 .home-feature-button:hover,
body.home-page-v2 .home-feature-button:focus-visible {
  border-color: var(--home-teal);
  color: var(--home-teal);
}

body.home-page-v2 .home-feature-button:disabled {
  opacity: 0.35;
  cursor: default;
}

body.home-page-v2 .home-feature-viewport {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  /* 初期位置・ループ位置の補正までCSSで補間すると、カードが操作中も動き続ける。 */
  scroll-behavior: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.home-page-v2 .home-feature-viewport::-webkit-scrollbar {
  display: none;
}

body.home-page-v2 .home-feature-progress {
  position: relative;
  width: 180px;
  height: 6px;
  margin: 2px auto 0;
  overflow: hidden;
  border-radius: 999px;
  background: #d6e0e8;
}

body.home-page-v2 .home-feature-progress-thumb {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: inherit;
  background: #9cafbd;
  transform: translateX(0);
  transition: transform 0.3s ease;
}

body.home-page-v2 .home-feature-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 36px) / 3);
  column-gap: 18px;
  padding-bottom: 12px;
}

body.home-page-v2 .home-feature-card {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid #cbd8e2;
  border-radius: 9px;
  background: #fff;
  color: var(--home-navy);
  text-decoration: none;
  scroll-snap-align: start;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

body.home-page-v2 .home-feature-card:hover,
body.home-page-v2 .home-feature-card:focus-visible {
  border-color: var(--home-teal);
  box-shadow: 0 10px 24px rgba(8, 47, 85, 0.12);
}

body.home-page-v2 .home-feature-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

body.home-page-v2 .home-feature-card span {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 64px;
  box-sizing: border-box;
  padding: 13px 39px 13px 15px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

body.home-page-v2 .home-feature-card span::after {
  content: "›";
  position: absolute;
  right: 15px;
  top: 50%;
  color: var(--home-teal);
  font-size: 23px;
  line-height: 1;
  transform: translateY(-50%);
}

body.home-page-v2 .home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 252px;
  gap: 42px;
  align-items: start;
  padding-top: 48px;
  padding-bottom: 72px;
}

body.home-page-v2 .home-news,
body.home-page-v2 .home-services {
  margin: 0 0 54px;
}

body.home-page-v2 .home-news .home-section-heading,
body.home-page-v2 .home-services .home-section-heading {
  margin-bottom: 0;
  padding: 14px 18px;
  border: 0;
  background: var(--home-navy);
}

body.home-page-v2 #center .home-news .home-section-heading h2,
body.home-page-v2 #center .home-services .home-section-heading h2 {
  color: #fff;
}

body.home-page-v2 .home-news-list {
  max-height: 450px;
  overflow-y: auto;
  border: 1px solid var(--home-line);
  border-top: 0;
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: #a9bbc8 transparent;
}

body.home-page-v2 .home-news-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 0;
  padding: 17px 18px;
  border-bottom: 1px solid #e1e7ec;
}

body.home-page-v2 .home-news-item:last-child {
  border-bottom: 0;
}

body.home-page-v2 .home-news-meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

body.home-page-v2 .home-news-meta time {
  color: var(--home-muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

body.home-page-v2 .home-news-label {
  display: inline-block;
  padding: 2px 9px;
  border: 1px solid #b7c6d1;
  border-radius: 999px;
  background: #fff;
  color: #36566f;
  font-size: 12px;
  line-height: 1.5;
}

body.home-page-v2 .home-news-label--service {
  border-color: #8fbdb8;
  color: #176f69;
}

body.home-page-v2 #center .home-news-item p {
  margin: 0;
  color: var(--home-text);
  font-size: 15px;
  line-height: 1.8;
}

body.home-page-v2 #center .home-news-title {
  margin-bottom: 3px;
  color: var(--home-navy);
  font-weight: 700;
}

body.home-page-v2 .home-news-item a {
  color: #15588f;
  text-underline-offset: 3px;
}

body.home-page-v2 .home-service {
  margin: 0;
  padding: 30px 18px 32px;
  border-bottom: 1px solid var(--home-line);
}

body.home-page-v2 .home-service:nth-of-type(even) {
  background: #f5f7f8;
}

body.home-page-v2 .home-service:first-of-type {
  padding-top: 22px;
}

body.home-page-v2 #center .home-service h3 {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--home-navy);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.6;
}

body.home-page-v2 .home-service-body {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

body.home-page-v2 .home-service-image {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid #d1dbe3;
  border-radius: 7px;
  background: #fff;
}

body.home-page-v2 .home-service-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.home-page-v2 #center .home-service-body p {
  margin: 0;
  color: #263f55;
  font-size: 15px;
  line-height: 1.95;
}

body.home-page-v2 .home-aside {
  display: grid;
  gap: 17px;
}

body.home-page-v2 .home-promo {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid #cbd8e2;
  border-radius: 9px;
  background: #fff;
  color: var(--home-navy);
  text-decoration: none;
}

body.home-page-v2 .home-promo:hover,
body.home-page-v2 .home-promo:focus-visible {
  border-color: var(--home-teal);
  box-shadow: 0 9px 20px rgba(8, 47, 85, 0.1);
}

body.home-page-v2 .home-promo-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 122px;
  box-sizing: border-box;
  padding: 10px;
  background: #f4f7f8;
}

body.home-page-v2 .home-promo-visual img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 105px;
}

body.home-page-v2 .home-promo-title {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  box-sizing: border-box;
  padding: 12px 16px;
  background: var(--home-navy);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

body.home-page-v2 .home-promo--dashboard .home-promo-title {
  background: #285d7d;
}

body.home-page-v2 .home-promo--movo .home-promo-title {
  flex-direction: column;
  padding-right: 10px;
  padding-left: 10px;
}

body.home-page-v2 .home-promo-title-line {
  display: block;
  white-space: nowrap;
}

body.home-page-v2 .home-promo-badge {
  position: absolute;
  right: 10px;
  top: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #b87921;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  transform: rotate(-7deg);
}

body.home-page-v2 .home-consultation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 54px;
  box-sizing: border-box;
  padding: 12px 15px;
  border: 1px solid var(--home-teal);
  border-radius: 7px;
  background: var(--home-teal);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
}

body.home-page-v2 .home-consultation:hover,
body.home-page-v2 .home-consultation:focus-visible {
  border-color: #176f69;
  background: #176f69;
}

body.home-page-v2 .home-consultation-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.home-page-v2 .fdw-btn {
  opacity: 1;
}

body.home-page-v2 #pagetopfix {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.home-page-v2 #pagetopfix.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@media (hover: hover) and (pointer: fine) {
  body.home-page-v2 a img {
    transition: opacity 0.05s linear;
  }

  body.home-page-v2 a:hover img {
    opacity: 0.7;
  }

  /* スライドはリンク自体を強調する。画像の点滅とクリック対象の揺れを防ぐ。 */
  body.home-page-v2 .home-feature-card img,
  body.home-page-v2 .home-feature-card:hover img {
    opacity: 1;
    transition: none;
  }
}

@media (max-width: 980px) {
  body.home-page-v2 .home-feature-track {
    grid-auto-columns: calc((100% - 18px) / 2);
  }

  body.home-page-v2 .home-layout {
    grid-template-columns: 1fr;
  }

  body.home-page-v2 .home-aside {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.home-page-v2 .home-shell {
    width: min(100% - 28px, 1200px);
  }

  body.home-page-v2 .home-hero-inner {
    padding-top: 42px;
    padding-bottom: 41px;
  }

  body.home-page-v2 .home-hero-kicker {
    font-size: 16px;
    letter-spacing: 0.08em;
  }

  body.home-page-v2 .home-hero-service {
    font-size: clamp(24px, 7vw, 31px);
    line-height: 1.5;
  }

  body.home-page-v2 .home-hero-service-line {
    white-space: normal;
  }

  body.home-page-v2 #center .home-hero-lead {
    margin-top: 20px;
    font-size: 15px;
  }

  body.home-page-v2 .home-feature {
    padding-top: 31px;
    padding-bottom: 34px;
  }

  body.home-page-v2 .home-section-heading {
    margin-bottom: 17px;
  }

  body.home-page-v2 #center .home-section-heading h2 {
    font-size: 22px;
  }

  body.home-page-v2 .home-feature-button {
    width: 38px;
    height: 38px;
  }

  body.home-page-v2 .home-layout {
    gap: 10px;
    padding-top: 38px;
    padding-bottom: 52px;
  }

  body.home-page-v2 .home-news-item {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 15px 14px;
  }

  body.home-page-v2 .home-news-meta {
    flex-direction: row;
    align-items: center;
  }

  body.home-page-v2 .home-service-body {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  body.home-page-v2 .home-service-image {
    width: min(350px, 100%);
  }

  body.home-page-v2 #center .home-service h3 {
    font-size: 19px;
  }

  body.home-page-v2 .home-aside {
    grid-template-columns: 1fr;
  }

  body.home-page-v2 .home-promo,
  body.home-page-v2 .home-consultation {
    width: min(360px, 100%);
    margin-right: auto;
    margin-left: auto;
  }
}

@media (max-width: 620px) {
  body.home-page-v2 .home-feature-track {
    grid-auto-columns: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.home-page-v2 .home-feature-viewport {
    scroll-behavior: auto;
  }

  body.home-page-v2 .home-feature-card {
    transition: none;
  }

  body.home-page-v2 #pagetopfix {
    transition: none;
  }
}
