:root {
  --main-color: #2c77bc;
  --sub-color: #1a3457;
  --cta-color: #26bfb6;
  --text-color: #333;
  --font-jp: source-han-sans-japanese, 'Noto Sans JP', sans-serif;
  --font-en: poppins, sans-serif;
  --container-max: 1200px;
}

.sp-only {
  display: none;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  color: var(--text-color);
  background: #fff;
  font-family: var(--font-jp);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.8;
  letter-spacing: .1em;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

a {
  text-decoration: none;
  transition: opacity .2s ease, background-color .2s ease, color .2s ease;
}

button {
  cursor: pointer;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 20px;
  color: #fff;
  background: var(--sub-color);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 13px;
  min-height: 60px;
  border-radius: 999px;
  padding: 12px 22px;
  color: #fff;
  line-height: 1.3;
  letter-spacing: .1em;
  font-weight: 700;
}

.btn>span:not(.btn__arrow) {
  white-space: nowrap;
}

.btn--blue {
  --button-color: var(--main-color);
  background: var(--button-color);
}

.btn--teal {
  --button-color: var(--cta-color);
  background: var(--button-color);
}

.btn__icon {
  display: block;
  flex: none;
  background-color: currentColor;
  -webkit-mask: var(--button-icon) center / contain no-repeat;
  mask: var(--button-icon) center / contain no-repeat;
}

.btn__icon--mail {
  --button-icon: url("../images/common/btn_icon_mail.png");
  width: 31px;
  height: 21px;
}

.btn__icon--search {
  --button-icon: url("../images/common/btn_icon_search.png");
  width: 30px;
  height: 30px;
}

.btn__arrow {
  flex: none;
  width: 8px;
  height: 8px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  margin-left: auto;
}

/* MEO参考サイトと同じ0.2秒の色反転。枠は内側に描き、寸法を変えない。 */
.btn {
  box-shadow: inset 0 0 0 2px var(--button-color, transparent);
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

@media (hover: hover) {
  a:hover {
    opacity: .75;
  }

  .btn:hover {
    opacity: 1;
    background-color: #fff;
    color: var(--button-color);
  }

  .header__menu nav a:hover {
    opacity: 1;
    color: var(--cta-color);
  }
}

.header {
  position: absolute;
  z-index: 10;
  inset: 0 0 auto;
}

.header__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 28px 0 49px;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 21px;
  margin-top: 18px;
  flex-shrink: 0;
}

.header__logo {
  width: 149px;
  height: 55px;
}

.header__tagline {
  transform: translateY(-2px);
  font-size: 16px;
  letter-spacing: .1em;
  white-space: nowrap;
}

.header__actions, .header__buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header__actions {
  gap: 10px;
}

.header__buttons {
  margin-top: 3px;
}

.header__buttons .btn {
  width: 230px;
  height: 60px;
  padding: 12px 17px 12px 20px;
  gap: 9px;
  font-size: 15px;
}

.header__buttons .btn--teal {
  padding-left: 30px;
}

.header__menu-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--main-color);
}

.header__menu-btn span {
  display: block;
  width: 26px;
  height: 1px;
  background: #fff;
}

.header__menu {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  padding: 32px;
  width: min(480px, 100%);
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  border: 0;
  background: #f3faff;
  color: var(--sub-color);
}

.header__menu::backdrop {
  background: rgb(18 41 70 / 35%);
}

.header__menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header__menu-top img {
  width: 149px;
}

.header__close {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--main-color);
  color: white;
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
}

.header__menu nav {
  display: grid;
  margin-top: 48px;
}

.header__menu nav a {
  display: block;
  padding: 22px 0;
  border-bottom: 1px solid #c8d9e9;
}

.is-menu-open {
  overflow: hidden;
}

@media (max-width: 1279px) {
  .header__inner {
    padding: 20px 24px 0;
  }

  .header__brand {
    margin-top: 4px;
    gap: 14px;
  }

  .header__tagline {
    font-size: 12px;
  }

  .header__buttons .btn {
    width: 196px;
    padding-inline: 14px;
    font-size: 13px;
    gap: 6px;
  }

  .header__buttons .btn--teal {
    padding-left: 14px;
  }
}

@media (max-width: 1023px) {
  .header__tagline {
    display: none;
  }
}

@media (max-width: 767px) {
  .sp-only {
    display: block;
  }

  .header__inner {
    align-items: center;
    padding: 20px 20px 0;
    gap: 16px;
  }

  .header__brand {
    margin: 0;
  }

  .header__logo {
    width: 119px;
    height: auto;
  }

  .header__buttons {
    display: none;
  }

  .header__menu-btn {
    width: 46px;
    height: 46px;
    gap: 6px;
  }

  .header__menu-btn span {
    width: 21px;
  }
}

/* 全ページで再利用する無料診断CTA。外側の間隔は各ページのCSSで指定。 */
.diagnosis-cta {
  position: relative;
  isolation: isolate;
  min-height: 384px;
  padding: 76px 50px 38px 94px;
  border-radius: 22px;
  background: #e9f6ff url('../images/common/cta_bg.jpg') center / cover no-repeat;
  box-shadow: 0 0 24px rgb(0 0 0 / 9%);
}

.diagnosis-cta__body {
  position: relative;
  z-index: 1;
  width: 640px;
  max-width: 100%;
}

.diagnosis-cta__title {
  color: var(--main-color);
  font-size: 36px;
  line-height: 60px;
  letter-spacing: .04em;
}

.diagnosis-cta__button {
  width: 544px;
  max-width: 100%;
  min-height: 70px;
  margin-top: 24px;
  padding-inline: 68px 30px;
  font-size: 26px;
}

.diagnosis-cta__note {
  margin-top: 20px;
  font-family: noto-sans-cjk-jp, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
}

.diagnosis-cta__image {
  position: absolute;
  right: 72px;
  top: 24px;
  width: 404px;
  height: auto;
}

@media (min-width: 768px) and (max-width: 1279px) {
  .diagnosis-cta {
    padding: 50px 40px;
    min-height: 330px;
  }

  .diagnosis-cta__body {
    width: 60%;
  }

  .diagnosis-cta__title {
    font-size: clamp(20px, 2.1vw, 25px);
    line-height: 1.8;
  }

  .diagnosis-cta__button {
    font-size: 20px;
    padding-inline: 25px;
    gap: 10px;
  }

  .diagnosis-cta__image {
    width: 32%;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
  }

  .diagnosis-cta__note {
    font-size: 12px;
  }
}

@media (max-width: 767px) {
  .diagnosis-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 0;
    padding: 30px 22px 24px;
    border-radius: 18px;
  }

  .diagnosis-cta__title {
    font-size: clamp(17px, 4.8vw, 24px);
    line-height: 1.8;
    letter-spacing: .04em;
  }

  .diagnosis-cta__title br {
    display: none;
  }

  .diagnosis-cta__button {
    width: 100%;
    padding: 16px 14px;
    justify-content: center;
    gap: 8px;
    min-height: 58px;
    margin-top: 20px;
    font-size: clamp(13px, 3.65vw, 18px);
    letter-spacing: .02em;
  }

  .diagnosis-cta__button .btn__icon {
    width: 24px;
    height: 24px;
  }

  .diagnosis-cta__note {
    margin-top: 14px;
    font-size: 11px;
    line-height: 1.8;
    letter-spacing: .04em;
  }

  .diagnosis-cta__image {
    position: static;
    width: 220px;
    margin-top: 22px;
  }
}

/* 全ページで再利用するフッター。 */
.footer {
  color: #fff;
  background: #2d3033;
  font-family: noto-sans-cjk-jp, sans-serif;
  font-weight: 400;
}

.footer__main {
  display: flex;
  justify-content: space-between;
  gap: 64px;
  width: min(1200px, calc(100% - 80px));
  min-height: 347px;
  margin-inline: auto;
  padding-block: 90px 94px;
}

.footer__brand {
  display: inline-block;
}

.footer__brand img {
  width: 149px;
  height: 55px;
}

.footer__description {
  margin-top: 42px;
  font-size: 15px;
  line-height: 28px;
  letter-spacing: .1em;
}

.footer__nav {
  display: grid;
  grid-template-columns: 170px 173px;
  column-gap: 62px;
  align-content: start;
  padding-top: 0;
}

.footer__nav a {
  display: inline-block;
  font-size: 14px;
  line-height: 34px;
  letter-spacing: .1em;
}

.footer__bottom {
  border-top: 1px solid #545658;
}

.footer__bottom-inner {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: min(1200px, calc(100% - 80px));
  min-height: 110px;
  margin-inline: auto;
}

.footer__copyright {
  font-family: poppins, sans-serif;
  font-size: 10px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: .1em;
}

.footer__to-top {
  position: absolute;
  right: 0;
  top: 24px;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 1px solid #fff;
}

.footer__to-top span {
  position: relative;
  width: 15px;
  height: 16px;
  border-top: 1px solid currentColor;
}

.footer__to-top span::after {
  position: absolute;
  content: '';
  width: 9px;
  height: 9px;
  left: 3px;
  top: 8px;
  border-top: 1px solid currentColor;
  border-left: 1px solid currentColor;
  transform: rotate(45deg);
}

@media (hover: hover) {
  .footer a:hover {
    opacity: .75;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .footer__main {
    gap: 35px;
  }

  .footer__description {
    font-size: 12px;
  }

  .footer__nav {
    grid-template-columns: auto auto;
    gap: 26px;
  }

  .footer__nav a {
    font-size: 12px;
  }
}

@media (max-width: 767px) {
  .footer__main {
    display: block;
    width: calc(100% - 40px);
    min-height: 0;
    padding-block: 50px 40px;
  }

  .footer__description {
    margin-top: 24px;
    font-size: clamp(11px, 3.05vw, 14px);
    line-height: 1.9;
    letter-spacing: .06em;
  }

  .footer__nav {
    grid-template-columns: 1fr 1.2fr;
    gap: 18px;
    margin-top: 32px;
  }

  .footer__nav a {
    padding-block: 6px;
    font-size: clamp(10px, 2.7vw, 13px);
    line-height: 1.9;
    letter-spacing: .04em;
  }

  .footer__bottom-inner {
    width: calc(100% - 40px);
    justify-content: flex-start;
    min-height: 88px;
    padding-right: 62px;
  }

  .footer__copyright {
    font-size: 9px;
    letter-spacing: .04em;
  }

  .footer__to-top {
    top: 20px;
    width: 48px;
    height: 48px;
  }
}

/* アンカー移動と色変化は、端末の「視差効果を減らす」設定に対応。 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  a, .btn {
    transition: none;
  }
}

/* MEO参考サイトのドロワーと同じ300ms。閉じ終わるまでdialogを維持。 */
.header__menu[open]::backdrop {
  animation: menu-backdrop-in .3s ease both;
}

.header__menu[open].is-closing::backdrop {
  animation: menu-backdrop-out .3s ease both;
}

.header__menu-btn span {
  transition: transform .25s ease, opacity .25s ease;
}

.header__menu-btn[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.header__menu-btn[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.header__menu-btn[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

@keyframes menu-backdrop-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes menu-backdrop-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@media (max-width: 767px) {
  .header__menu-btn[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .header__menu-btn[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .header__menu[open]::backdrop {
    animation: none;
  }

  .header__menu-btn span {
    transition: none;
  }
}

/* 閉じる記号はフォントに依存せず、ボタン中央で交差させる。 */
.header__menu-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: center;
}

.header__close {
  position: relative;
  flex: none;
  padding: 0;
  letter-spacing: 0;
}

.header__close::before, .header__close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}

.header__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.header__menu-ctas {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.header__menu-ctas .btn {
  width: 100%;
  font-size: 16px;
}

.header__menu-ctas+nav {
  margin-top: 24px;
}

@media (max-width: 767px) {
  html {
    scroll-padding-top: 76px;
  }

  .header__menu {
    padding: 24px;
  }

  .header__menu-ctas .btn {
    min-height: 56px;
    padding: 12px 16px;
    gap: 10px;
    font-size: 14px;
    letter-spacing: .04em;
  }

  .header.is-scrolled .header__actions {
    position: fixed;
    z-index: 11;
    inset: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
    padding: calc(10px + env(safe-area-inset-top)) 10px 10px;
    background: #fff;
    box-shadow: 0 3px 16px rgb(26 52 87 / 12%);
  }

  .header.is-scrolled .header__buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 0;
  }

  .header.is-scrolled .header__buttons .btn {
    width: 100%;
    height: 44px;
    min-height: 44px;
    padding: 8px;
    justify-content: center;
    gap: 5px;
    font-size: clamp(10px, 2.8vw, 13px);
    letter-spacing: 0;
  }

  .header.is-scrolled .header__buttons .btn__icon {
    width: 16px;
    height: 16px;
  }

  .header.is-scrolled .header__buttons .btn__arrow {
    display: none;
  }

  .header.is-scrolled .header__menu-btn {
    width: 44px;
    height: 44px;
  }
}
/* PC・タブレットもCTAとメニューボタンのみを右上に追従。 */
@media (min-width: 768px) {
  .header.is-scrolled .header__actions {
    position: fixed;
    z-index: 11;
    top: 22px;
    right: 28px;
  }
}
@media (min-width: 768px) and (max-width: 1279px) {
  .header.is-scrolled .header__actions {
    top: 20px;
    right: 24px;
  }
}
