/* =========================================================
   common.css  — 全ページ共通スタイル
   ========================================================= */

/* ------------------------------
   基本設定
------------------------------ */
:root {
  --color-primary: #ff0000;
  --color-primary-dark: #e60012;
  --color-primary-bright: #ff1a1a;
  --color-primary-hover: #cc0000;
  --header-control-bg: rgba(255, 255, 255, .78);
  --header-control-border: rgba(255, 255, 255, .42);
  --header-control-shadow: 0 .4rem 1.4rem rgba(0, 0, 0, .08);
  --content-max: 144rem;
  --content-padding: min(8rem, 5.56%);
  --page-content-bottom: 8rem;
  --section-space: 8rem;
  --section-space-large: 14rem;
  --section-stack-space: 14rem;
  --internal-mv-padding-top: 12.85%;
  --internal-mv-padding-bottom: 13.41%;
  --internal-mv-padding-bottom-with-text: var(--page-content-bottom);
  --internal-mv-title-gap: 1.85%;
  --internal-mv-text-gap: 4.17%;
}

html {
  scroll-behavior: smooth;
  font-size: 62.5%;
  height: auto;
  overflow: visible;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img {
  width: 100%;
}

body {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1.6rem;
  overflow-x: hidden;
}

html.is-loading,
body.is-loading {
  overflow: hidden;
}

.page-loader {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #fff;
  z-index: 10000;
  opacity: 1;
  visibility: visible;
  transition:
    opacity .45s ease,
    visibility .45s ease;
}

.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3.2rem;
  width: min(72rem, 82vw);
}

.page-loader__logo {
  width: min(30rem, 62vw);
  height: auto;
}

.page-loader__bar {
  width: min(72rem, 82vw);
  height: .2rem;
  overflow: hidden;
  background: rgba(230, 0, 18, .14);
}

.page-loader__bar span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--color-primary-dark);
  transition: width .28s cubic-bezier(.22, 1, .36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .page-loader,
  .page-loader__bar span,
  .internal_mv_tit_area.has-intro .internal_mv_sub_tit,
  .internal_mv_tit_area.has-intro .internal_mv_txt,
  .mask-text.is-active .char span {
    transition: none;
    animation: none;
  }

  .internal_mv_tit_area.has-intro .internal_mv_sub_tit,
  .internal_mv_tit_area.has-intro .internal_mv_txt {
    opacity: 1;
    transform: translateY(0);
  }

  .mask-text .char span {
    transform: translateY(0);
  }
}


/* ------------------------------
   テキスト共通
------------------------------ */
.section_tit_area {
  display: flex;
  align-items: center;
  width: 100%;
}

.section_sub_tit {
  font-size: clamp(1.2rem, 1.25vw, 1.8rem);
  font-weight: 900;
  color: var(--color-primary);
  margin-bottom: 1.67%;
}

.main_txt {
  font-size: 1.6rem;
  margin-top: 3.89%;
  line-height: 1.6;
  font-weight: 900;
}

/* ------------------------------
   Header
------------------------------ */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 10.5rem;
  display: flex;
  z-index: 1000;
}

.header_inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9rem;
}

.header_logo a {
  display: block;
  width: 24rem;
}

.header_nav {
  padding: .7rem 2rem;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.header_nav ul {
  display: flex;
  gap: 2.8rem;
}

.header_nav a {
  display: block;
  padding: .5rem .3rem;
  font-size: 1.5rem;
  color: #000;
  font-weight: 700;
  transition:
    background-color .25s ease,
    color .25s ease,
    transform .25s ease;
}

.header_nav a:hover {
  transform: translateY(-.1rem);
}


@media (max-width: 1150px) {
  .nav_sp {
    display: none;
  }
}

/* ハンバーガーボタン */
.header_toggle {
  position: relative;
  width: 6rem;
  height: 4.8rem;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  z-index: 1000;
  transition:
    background-color .25s ease,
    border-color .25s ease,
    transform .25s ease;
}

.header_toggle:hover {
  transform: translateY(-.1rem);
}

.header_toggle span {
  position: absolute;
  display: block;
  width: 3rem;
  height: 2px;
  background-color: #000;
  transition:
    transform 0.25s ease,
    opacity 0.2s ease;
}

.header_toggle span:nth-child(1) {
  transform: translateY(-1rem);
}

.header_toggle span:nth-child(2) {
  transform: translateY(0);
}

.header_toggle span:nth-child(3) {
  transform: translateY(1rem);
}

.header_toggle.is_open span:nth-child(1) {
  transform: translateY(0) rotate(45deg);
}

.header_toggle.is_open span:nth-child(2) {
  opacity: 0;
}

.header_toggle.is_open span:nth-child(3) {
  transform: translateY(0) rotate(-45deg);
}

/* =======================
   ハンバーガー　ナビ
   ======================= */
.global_nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 30%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  padding: 8rem 5rem;
  transition: right 0.3s ease;
  z-index: 999;
}

.global_nav.is_open {
  right: 0;
}

.global_nav ul {
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.global_nav a {
  color: #fff;
  font-size: 1.6rem;
}

/* ------------------------------
   Footer
------------------------------ */
.footer {
  position: relative;
  background: #fff;
  color: #000;
  overflow: visible;
  padding: clamp(5.6rem, 5.56vw, 9rem) min(8vw, 16rem) clamp(6rem, 6vw, 9.6rem);
  border-top: solid 0.5px #b3b3b3;
}

.footer__inner {
  width: 100%;
  max-width: 168rem;
  margin: 0 auto;
}

.footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5rem;
}

.footer__brand {
  display: block;
  width: clamp(30rem, 25vw, 52rem);
  flex: 0 0 auto;
}

.footer__brand img {
  display: block;
  width: 100%;
  height: auto;
}

.footer__nav ul {
  display: flex;
  align-items: center;
  gap: clamp(3rem, 4.25vw, 7.2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__nav a {
  color: #000;
  font-size: clamp(1.6rem, 1.25vw, 2.4rem);
  font-weight: 900;
  letter-spacing: .02em;
  white-space: nowrap;
}

.footer__line {
  width: 100%;
  height: 1px;
  margin-top: clamp(4.4rem, 4.1vw, 7rem);
  background: var(--color-primary);
}

.footer__info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(5rem, 7vw, 12rem);
  max-width: 96rem;
  margin-top: clamp(4rem, 4vw, 6.4rem);
}

.footer__address {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-style: normal;
  font-size: clamp(1.6rem, 1.25vw, 2.4rem);
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: .08em;
}

.footer__address-title {
  margin-bottom: .4rem;
}

.footer__tel {
  margin-top: 2.4rem;
}

.footer__address a {
  color: inherit;
}

@media (max-width: 1100px) {
  .footer__top {
    align-items: flex-start;
    flex-direction: column;
    gap: 3.6rem;
  }

  .footer__nav ul {
    flex-wrap: wrap;
    gap: 2rem 3.2rem;
  }

  .footer__line {
    width: 100%;
  }
}

@media (max-width: 1024px) {
  :root {
    --content-padding: 4rem;
    --page-content-bottom: 7rem;
  }
}

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

.subpage_content {
  padding-bottom: var(--page-content-bottom);
}

.inner_wrap1440 {
  max-width: var(--content-max);
  margin: var(--section-space-large) auto;
  padding: 0 var(--content-padding);
}

.section_area {
  max-width: var(--content-max);
  margin: 0 auto;
}

.section_area+.section_area {
  margin-top: var(--section-stack-space);
}

/* テキストアニメーション */
/* テキスト全体 */
.mask-text {
  overflow: hidden;
}

/* 1文字のマスク枠 */
.mask-text .char {
  display: inline-block;
  overflow: hidden;
  line-height: 1.2;
}

/* 実際の文字 */
.mask-text .char span {
  display: inline-block;
  transform: translateY(100%);
}

/* 発火後 */
.mask-text.is-active .char span {
  animation: maskUp 0.45s cubic-bezier(.25, .8, .25, 1) forwards;
}

/* マスクアニメ */
@keyframes maskUp {
  to {
    transform: translateY(0);
  }
}

@keyframes internalMvFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.clip-image {
  overflow: hidden;
}

.clip-image img {
  display: block;
  width: 100%;
  height: auto;

  /* 最初は右側だけ見えない */
  clip-path: inset(0 100% 0 0);
}

/* 発火後：右→左に表示 */
.clip-image.is-active img {
  animation: clipWipe 0.9s cubic-bezier(.25, .8, .25, 1) forwards;
}

/* アニメーション */
@keyframes clipWipe {
  to {
    clip-path: inset(0 0 0 0);
  }
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;

  /* アニメーション */
  transition: transform 0.4s cubic-bezier(.25, .8, .25, 1);
}

/* 下スクロール時：隠す */
.site-header.is-hidden {
  transform: translateY(-100%);
}

/* 下層ページmv */
.internal_mv {
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

.internal_mv_tit_area {
  padding: var(--internal-mv-padding-top) 0 var(--internal-mv-padding-bottom);
  margin: 0 auto;
  color: var(--color-primary);
}

#service .internal_mv_tit_area {
  padding-bottom: var(--internal-mv-padding-bottom-with-text);
}

.internal_mv_tit {
  font-size: clamp(7rem, 6.94vw, 10rem);
  font-weight: 700;
  line-height: 1;
}

.internal_mv_sub_tit {
  font-size: clamp(1.2rem, 1.25vw, 1.8rem);
  font-weight: 700;
  margin-top: var(--internal-mv-title-gap);
}

.internal_mv_txt {
  font-size: clamp(1rem, 1.48vw, 1.6rem);
  font-weight: 500;
  margin-top: var(--internal-mv-text-gap);
  color: #000;
  line-height: 1.6;
}

.internal_mv_tit_area.has-intro .internal_mv_sub_tit,
.internal_mv_tit_area.has-intro .internal_mv_txt {
  opacity: 0;
  transform: translateY(1.8rem);
}

.internal_mv_tit_area.has-intro.is-active .internal_mv_sub_tit {
  animation: internalMvFadeUp 0.6s cubic-bezier(.22, 1, .36, 1) 0.08s forwards;
}

.internal_mv_tit_area.has-intro.is-active .internal_mv_txt {
  animation: internalMvFadeUp 0.7s cubic-bezier(.22, 1, .36, 1) 0.2s forwards;
}


.section_btn {
  display: flex;
  justify-content: center;
  padding-top: 5rem;
}

/* ボタン本体 */
.cta-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: .6rem 2rem .6rem 3rem;
  border: 2px solid var(--color-primary);
  border-radius: 999px;
  color: #000;
  background-color: #fff;
  text-decoration: none;
  font-size: 1.6rem;
  font-weight: 700;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* 背景エフェクト */
.cta-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 0, 0, 0.1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  z-index: 0;
}

.cta-btn:hover::before {
  transform: scaleX(1);
}

/* テキスト */
.cta-btn .text {
  position: relative;
  z-index: 1;
}

/* アイコン丸 */
.icon {
  position: relative;
  width: 4rem;
  height: 4rem;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1;
}

/* 矢印 */
.arrow {
  width: 1.2rem;
  height: 1.2rem;
  border-top: 2px solid #000;
  border-right: 2px solid #000;
  transform: rotate(45deg);
  margin-right: .3rem;
}

/* ホバー時 */
.cta-btn:hover {
  border-color: var(--color-primary-hover);
}

.cta-btn:hover .icon {
  background: var(--color-primary);
}

.cta-btn:hover .arrow {
  transform: rotate(45deg);
  border-color: #fff;
}

@media (max-width: 768px) {
  :root {
    --content-padding: 2rem;
    --page-content-bottom: 6.4rem;
    --section-space: 6rem;
    --section-space-large: 7rem;
    --section-stack-space: 8rem;
    --internal-mv-padding-top: 11rem;
    --internal-mv-padding-bottom: 5.6rem;
    --internal-mv-padding-bottom-with-text: var(--internal-mv-padding-bottom);
    --internal-mv-title-gap: 0;
    --internal-mv-text-gap: 2.4rem;
  }

  body {
    font-size: 1.4rem;
  }

  .page-loader__inner {
    gap: 2.8rem;
    width: min(34rem, 84vw);
  }

  .page-loader__logo {
    width: min(22rem, 64vw);
  }

  .page-loader__bar {
    width: min(34rem, 84vw);
  }

  header {
    height: 7.2rem;
  }

  .header_inner {
    padding: 0 var(--content-padding);
  }

  .header_logo a {
    width: 14rem;
  }

  .header_nav {
    display: none;
  }

  .header_toggle {
    width: 4.8rem;
    height: 4rem;
  }

  .header_toggle span {
    width: 2.6rem;
  }

  .header_toggle span:nth-child(1) {
    transform: translateY(-.8rem);
  }

  .header_toggle span:nth-child(3) {
    transform: translateY(.8rem);
  }

  .global_nav {
    width: 100%;
    padding: 10rem 2.4rem 4rem;
  }

  .global_nav a {
    font-size: 1.8rem;
  }

  .inner_wrap1440 {
    margin: var(--section-space-large) auto;
  }

  .internal_mv_tit_area,
  #service .internal_mv_tit_area {
    padding: var(--internal-mv-padding-top) 0 var(--internal-mv-padding-bottom);
  }

  .internal_mv_tit {
    font-size: clamp(4.6rem, 15vw, 6.8rem);
    line-height: .95;
    overflow-wrap: anywhere;
  }

  .internal_mv_sub_tit {
    font-size: 1.3rem;
    line-height: 1.6;
  }

  .internal_mv_txt {
    font-size: 1.4rem;
    line-height: 1.9;
  }

  .section_area+.section_area {
    margin-top: var(--section-stack-space);
  }

  .footer {
    padding: 4.8rem var(--content-padding) 5.6rem;
  }

  .footer__top {
    align-items: flex-start;
    flex-direction: column;
    gap: 3.2rem;
  }

  .footer__brand {
    width: min(100%, 32rem);
  }

  .footer__nav {
    width: 100%;
  }

  .footer__nav ul {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }

  .footer__nav a {
    display: inline-block;
    font-size: 1.5rem;
  }

  .footer__line {
    width: 100%;
    margin-top: 3.2rem;
  }

  .footer__info {
    grid-template-columns: 1fr;
    gap: 3.2rem;
    max-width: none;
    margin-top: 3.2rem;
  }

  .footer__address {
    gap: .6rem;
    font-size: 1.5rem;
    line-height: 1.65;
    letter-spacing: .04em;
  }

  .footer__tel {
    margin-top: 1.6rem;
  }

  .main_txt {
    font-size: 1.4rem;
    line-height: 1.9;
  }

  .section_btn {
    padding-top: 3.2rem;
  }

  .cta-btn {
    gap: 1.4rem;
    width: 100%;
    max-width: 34rem;
    justify-content: space-between;
    padding: .6rem 1.4rem .6rem 2rem;
    font-size: 1.4rem;
  }

  .icon {
    flex: 0 0 auto;
    width: 3.2rem;
    height: 3.2rem;
  }

  .arrow {
    width: 1rem;
    height: 1rem;
  }
}
