/* =========================================================
   wise-inc / 下層ページ共通スタイルシート (subpage-common.css)
   下層ページ共通：白背景ベース、固定ヘッダー、ページ見出し、
   2カラムレイアウト（左固定索引・右コンテンツ）、下部CTA導線
   ========================================================= */

:root {
  /* 下層ページのカラーパレット */
  --navy:     #091E3A;
  --mid:      #1C4F94;
  --blue:     #2F80ED;
  --gold:     #FFFD94;
  --foot:     #1A304D;

  /* 明るい地と文字 */
  --ink:      #142034;
  --strong:   #0C1B31;
  --sub:      #55617A;
  --faint:    #8D97A6;
  --line:     #E2E7EE;
  --hair:     #EFF2F6;
  --bg:       #FFFFFF;
  --bg2:      #F5F8FB;

  --gutter:   clamp(20px, 5.4vw, 72px);
  --max:      1240px;
  --bar:      clamp(14px, 1.95vw, 28px);
  --headH:    clamp(58px, 5.6vw, 80px);
  --headSpace:calc(var(--headH) + var(--bar) * 2);
  --ease:     cubic-bezier(.16, 1, .3, 1);
  --brush:    "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
}

body:not(.home) {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 15px;
  line-height: 1.95;
  letter-spacing: .03em;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --- 下層固定ヘッダー (hd) ---------------------------- */
.hd {
  position: fixed;
  z-index: 70;
  top: var(--bar);
  left: var(--bar);
  right: var(--bar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--headH);
  padding-inline: clamp(16px, 2.2vw, 32px);
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 3px;
  background: rgba(9, 26, 52, .20);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
          backdrop-filter: blur(14px) saturate(120%);
  color: #fff;
  transition: background-color .45s ease, border-color .45s ease, box-shadow .45s ease;
}

/* メニューが開いているあいだは、ヘッダーの地をメニューに溶け込ませる */
.is-menu-open .hd {
  background: transparent;
  border-color: rgba(255, 255, 255, .2);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.is-menu-open .hd .btn--ghost {
  opacity: 0;
  pointer-events: none;
}
.hd .btn {
  transition: background-color .3s ease, color .3s ease, box-shadow .3s ease, opacity .3s ease;
}

.hd.is-solid {
  background: rgba(9, 26, 52, .95);
  border-color: rgba(255, 255, 255, .12);
  box-shadow: 0 12px 34px rgba(6, 18, 36, .20);
}

.hd__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.hd__brand .logo,
.hd .logo {
  display: block;
  flex: none;
  width: clamp(120px, 12.4vw, 178px);
  aspect-ratio: 864 / 227;
  filter: none;
}

.hd__nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.9vw, 28px);
}

.hd__nav a {
  color: #fff;
  text-decoration: none;
  font-size: clamp(13px, 1.02vw, 15px);
  font-weight: 500;
  letter-spacing: .03em;
  padding: 6px 2px;
}

.hd__nav a[aria-current="page"] {
  color: var(--gold);
}

.hd__acts {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: clamp(34px, 2.9vw, 42px);
  padding-inline: clamp(12px, 1.3vw, 20px);
  border-radius: 2px;
  text-decoration: none;
  font-size: clamp(12px, .95vw, 14px);
  font-weight: 500;
  letter-spacing: .04em;
  white-space: nowrap;
  transition: background-color .3s ease, color .3s ease, box-shadow .3s ease;
}

.btn--ghost {
  background: #EAF2FE;
  color: var(--navy);
}

.btn--ghost:hover {
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .16);
}

.btn--solid {
  background: #0E2C55;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .22);
}

.btn--solid:hover {
  background: #153a6d;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .12);
}

.btn svg {
  width: 15px;
  height: 15px;
  flex: none;
}

/* --- 参考サイトの「くるっと入れ替わる」見出し --- */
.roll {
  position: relative;
  display: inline-flex;
  overflow: hidden;
  line-height: 1.35;
  vertical-align: bottom;
}

.roll > span {
  display: block;
  will-change: transform;
  transition: transform .52s var(--ease);
}

.roll > span + span {
  position: absolute;
  left: 0;
  top: 0;
  transform: translateY(106%);
}

.hd__nav a:hover .roll > span,
.hd__nav a:focus-visible .roll > span {
  transform: translateY(-106%);
}

.hd__nav a:hover .roll > span + span,
.hd__nav a:focus-visible .roll > span + span {
  transform: translateY(0);
}

.hd .ws-header__burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(34px, 2.9vw, 42px);
  height: clamp(34px, 2.9vw, 42px);
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 2px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  padding: 0;
  transition: background-color .3s ease, border-color .3s ease;
}

.hd .ws-header__burger:hover {
  background: rgba(255, 255, 255, .12);
}

@media (max-width: 1024px) {
  .hd__nav { display: none; }
}

@media (max-width: 640px) {
  .hd { gap: 12px; }
  .btn--ghost { display: none; }
}

/* =========================================================
   ページ見出し（トップページの暗い地を受け継ぐ）
   ========================================================= */
.ph {
  position: relative;
  overflow: hidden;
  background: linear-gradient(104deg, var(--navy) 0%, #14375F 52%, #1E5091 100%);
  color: #fff;
  padding-block: calc(var(--headSpace) + clamp(26px, 4vh, 46px)) clamp(52px, 8vh, 92px);
}

/* 計器の目盛りのような細い格子。主張しない濃さに留める */
.ph::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .055) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg,  rgba(255, 255, 255, .04) 0 1px, transparent 1px 96px);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), transparent 88%);
          mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), transparent 88%);
}

.ph__inner {
  position: relative;
  z-index: 1;
}

.crumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(30px, 5vw, 58px);
  font-family: "Barlow", sans-serif;
  font-size: 11.5px;
  letter-spacing: .12em;
  color: rgba(255, 255, 255, .55);
}
.crumb a {
  text-decoration: none;
  color: rgba(255, 255, 255, .55);
  transition: color .28s ease;
}
.crumb a:hover {
  color: var(--gold);
}
.crumb em {
  font-style: normal;
  color: #fff;
}

.ph__label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 clamp(12px, 1.8vw, 20px);
  font-family: "Barlow", sans-serif;
  font-weight: 400;
  font-size: clamp(12px, 1vw, 15px);
  letter-spacing: .16em;
  color: #fff;
}
.ph__label i {
  width: 6px;
  height: 6px;
  background: var(--gold);
  flex: none;
}

.ph__h {
  margin: 0;
  font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-weight: 600;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.16;
  letter-spacing: .07em;
  color: #fff;
}

.ph__lead {
  margin: clamp(20px, 2.8vw, 32px) 0 0;
  max-width: 32em;
  font-size: clamp(13.5px, 1.05vw, 15px);
  line-height: 2.1;
  color: rgba(255, 255, 255, .76);
}

/* =========================================================
   本体：左に索引、右に中身
   ========================================================= */
.shell {
  display: grid;
  grid-template-columns: clamp(150px, 15vw, 200px) minmax(0, 1fr);
  gap: clamp(30px, 5vw, 88px);
  padding-block: clamp(48px, 7vh, 86px) clamp(60px, 9vh, 110px);
}

/* --- 左：常に見えている索引 --- */
.idx {
  position: sticky;
  top: calc(var(--headSpace) + clamp(16px, 2.6vh, 30px));
  align-self: start;
  min-width: 0;
}
.idx__t {
  margin: 0 0 clamp(14px, 1.8vw, 20px);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-family: "Barlow", sans-serif;
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: .2em;
  color: var(--faint);
}
.idx ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.idx a {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  padding-block: 9px;
  text-decoration: none;
  color: var(--sub);
  font-size: clamp(12.5px, 1vw, 14px);
  letter-spacing: .04em;
  transition: color .28s ease;
}
.idx a b {
  font-family: "Barlow", sans-serif;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: .12em;
  color: #AAB4C2;
  font-variant-numeric: tabular-nums;
  transition: color .28s ease;
}
.idx a:hover {
  color: var(--blue);
}
.idx a:hover b {
  color: var(--blue);
}
.idx a.on {
  color: var(--strong);
  font-weight: 500;
}
.idx a.on b {
  color: var(--blue);
}

/* --- 右：中身 --- */
.body {
  min-width: 0;
  max-width: 880px;
}

/* セクションの型。毎回同じ順番で出るので迷わない */
.sec {
  scroll-margin-top: calc(var(--headSpace) + 20px);
}
.sec + .sec {
  margin-top: clamp(58px, 8vh, 104px);
}
.sec__head {
  margin-bottom: clamp(24px, 3.2vw, 44px);
}
.sec__no {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 clamp(10px, 1.4vw, 16px);
  font-family: "Barlow", sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.sec__no i {
  width: 5px;
  height: 5px;
  background: var(--blue);
  flex: none;
}
.sec__h {
  margin: 0 0 clamp(14px, 1.8vw, 22px);
  font-weight: 400;
  font-size: clamp(24px, 2.9vw, 40px);
  line-height: 1.3;
  letter-spacing: .06em;
  color: var(--strong);
}
.sec__rule {
  display: block;
  height: 1px;
  background: var(--line);
}
.sec__lead {
  margin: clamp(14px, 1.8vw, 22px) 0 0;
  max-width: 34em;
  font-size: clamp(13px, 1.02vw, 14.5px);
  line-height: 2.05;
  color: var(--sub);
}

/* --- 下層共通ボトム導線 (CTA) -------------------------- */
.cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(118deg, #050F1F 0%, #0A2445 55%, #113463 100%);
  color: #fff;
  padding-block: clamp(60px, 10vh, 120px);
  margin: 0 var(--bar) clamp(30px, 4vw, 56px);
  border-radius: 4px;
}

@media (min-width: 900px) {
  .cta .cta__inner {
    width: min(100% + var(--bar) * 2, var(--max));
    margin-inline: calc((100% - min(100% + var(--bar) * 2, var(--max))) / 2);
    max-width: none;
  }
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(0deg,  rgba(255, 255, 255, .035) 0 1px, transparent 1px 88px);
  -webkit-mask-image: radial-gradient(120% 90% at 78% 40%, #000 10%, transparent 72%);
          mask-image: radial-gradient(120% 90% at 78% 40%, #000 10%, transparent 72%);
}

.cta__ghost {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  right: clamp(-30px, -1vw, 0px);
  top: 50%;
  margin: 0;
  transform: translate(6%, -50%);
  font-family: "Barlow", sans-serif;
  font-weight: 200;
  font-size: clamp(84px, 17vw, 260px);
  line-height: .8;
  letter-spacing: .02em;
  color: rgba(255, 255, 255, .038);
  opacity: 0;
  transition: opacity 1.1s ease .25s, transform 1.4s var(--ease) .25s;
}
.cta.in .cta__ghost {
  opacity: 1;
  transform: translate(0, -50%);
}

.cta__box {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  inset: clamp(16px, 2.2vw, 34px);
}
.cta__box i {
  position: absolute;
  background: rgba(255, 255, 255, .22);
}
.cta__box i:nth-child(1) {
  left: 0; top: 0; right: 0; height: 1px;
  transform: scaleX(0); transform-origin: left;
  transition: transform .7s var(--ease) .10s;
}
.cta__box i:nth-child(2) {
  right: 0; top: 0; bottom: 0; width: 1px;
  transform: scaleY(0); transform-origin: top;
  transition: transform .5s var(--ease) .44s;
}
.cta__box i:nth-child(3) {
  left: 0; bottom: 0; right: 0; height: 1px;
  transform: scaleX(0); transform-origin: right;
  transition: transform .7s var(--ease) .62s;
}
.cta__box i:nth-child(4) {
  left: 0; top: 0; bottom: 0; width: 1px;
  transform: scaleY(0); transform-origin: bottom;
  transition: transform .5s var(--ease) 1.0s;
}
.cta.in .cta__box i {
  transform: none;
}

.cta__beam {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  left: clamp(16px, 2.2vw, 34px);
  right: clamp(16px, 2.2vw, 34px);
  top: clamp(16px, 2.2vw, 34px);
  height: 1px;
  overflow: hidden;
  opacity: 0;
  transition: opacity .8s ease 1.2s;
}
.cta.in .cta__beam {
  opacity: 1;
}
.cta__beam::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 26%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.cta.in .cta__beam::after {
  animation: cta-beam 5.2s linear 1.4s infinite;
}
@keyframes cta-beam {
  from { transform: translateX(-100%); }
  to   { transform: translateX(385%); }
}

.cta__inner {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(28px, 4.4vw, 80px);
  align-items: center;
  padding-block: clamp(14px, 2vw, 26px);
}
.cta__label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 clamp(14px, 1.9vw, 22px);
  font-family: "Barlow", sans-serif;
  font-weight: 400;
  font-size: clamp(11.5px, .95vw, 14px);
  letter-spacing: .18em;
  color: #fff;
}
.cta__label i {
  width: 6px;
  height: 6px;
  background: var(--gold);
  flex: none;
}
.cta__h {
  margin: 0 0 clamp(16px, 2.2vw, 26px);
  font-weight: 300;
  font-size: clamp(23px, 2.9vw, 42px);
  line-height: 1.45;
  letter-spacing: .06em;
}
.cta__lead {
  margin: 0;
  max-width: 28em;
  font-size: clamp(12.5px, 1vw, 14.5px);
  line-height: 2.05;
  color: rgba(255, 255, 255, .7);
}

/* --- 右：2つの導線 --- */
.cta__acts {
  display: grid;
  gap: clamp(20px, 2.8vw, 34px);
  justify-items: start;
}
.cta__go {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: clamp(54px, 4.4vw, 68px);
  padding-inline: clamp(26px, 3vw, 42px);
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  text-decoration: none;
  font-size: clamp(13.5px, 1.12vw, 16px);
  letter-spacing: .1em;
  white-space: nowrap;
  transition: color .45s cubic-bezier(.785, .135, .15, .86);
}
.cta__go::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .55s cubic-bezier(.785, .135, .15, .86);
}
.cta__go > * {
  position: relative;
  z-index: 1;
}
.cta__go svg {
  width: 17px;
  height: 17px;
  flex: none;
  transition: transform .45s var(--ease);
}
@media (any-hover: hover) {
  .cta__go:hover {
    color: var(--navy);
  }
  .cta__go:hover::before {
    transform: none;
  }
  .cta__go:hover svg {
    transform: translateX(5px);
  }
}
.cta__go:focus-visible {
  color: var(--navy);
}
.cta__go:focus-visible::before {
  transform: none;
}

.cta__tel {
  display: grid;
  gap: 6px;
}
.cta__telCap {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Barlow", sans-serif;
  font-size: 10.5px;
  letter-spacing: .18em;
  color: rgba(255, 255, 255, .5);
}
.cta__telCap::before {
  content: "";
  width: 14px;
  height: 1px;
  background: rgba(255, 255, 255, .34);
}
.cta__telNo {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  font-family: "Barlow", sans-serif;
  font-weight: 300;
  font-size: clamp(26px, 2.6vw, 38px);
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-decoration: none;
  transition: color .32s ease;
}
.cta__telNo i {
  font-style: normal;
  font-size: 11px;
  letter-spacing: .2em;
  color: rgba(255, 255, 255, .5);
  transition: color .32s ease;
}
.cta__telNo:hover,
.cta__telNo:hover i {
  color: var(--gold);
}
.cta__hours {
  margin: 0;
  font-size: 11.5px;
  letter-spacing: .05em;
  color: rgba(255, 255, 255, .55);
}

@media (max-width: 900px) {
  .cta__inner {
    grid-template-columns: 1fr;
    gap: clamp(26px, 6vw, 38px);
  }
  .cta__acts {
    justify-items: stretch;
  }
  .cta__go {
    justify-content: center;
  }
  .cta__ghost {
    font-size: clamp(76px, 26vw, 150px);
  }
}

@media (max-width: 640px) {
  .cta__box {
    inset: 11px;
  }
  .cta__beam {
    left: 11px;
    right: 11px;
    top: 11px;
  }
  .cta .cta__inner {
    padding-inline: calc(var(--gutter) + 12px);
  }
}

@media (prefers-reduced-motion: __disabled__) {
  .cta__ghost,
  .cta__box i,
  .cta__beam {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .cta.in .cta__beam::after {
    animation: none;
  }
}

/* --- レスポンシブ -------------------------------------- */
@media (max-width: 900px) {
  /* 索引は上に回して横に並べる。位置は固定したままにして見失わせない */
  .shell {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(24px, 5vw, 34px);
  }
  .idx {
    position: sticky;
    top: var(--headSpace);
    z-index: 30;
    margin-inline: calc(var(--gutter) * -1);
    padding: 10px var(--gutter);
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
  }
  .idx__t { display: none; }
  .idx ol {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .idx ol::-webkit-scrollbar { display: none; }
  .idx li { flex: none; }
  .idx a {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    white-space: nowrap;
    background: #fff;
  }
  .idx a.on {
    border-color: var(--navy);
    color: var(--strong);
  }
  .sec {
    scroll-margin-top: calc(var(--headSpace) + 66px);
  }
}

/* --- アニメーション共通 -------------------------------- */
.rl {
  display: block;
  overflow: hidden;
  padding-block: .16em;
  margin-block: -.16em;
}
.rl > span {
  display: block;
  transform: translateY(112%);
  transition: transform .95s var(--ease) var(--d, 0s);
}
.in .rl > span {
  transform: none;
}

.up {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease var(--d, 0s), transform .8s var(--ease) var(--d, 0s);
}
.in .up,
.up.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: __disabled__) {
  .rl > span, .up {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}
