/* ============================================================
   SAPEET AX Solution — style.css
   Source: SAPEET AX Solution デザインガイドライン v1.0
   Fonts : Jost (Latin) + Noto Sans JP (Japanese) — Google Fonts
   ============================================================

   ブレークポイント方針
   ------------------------------------------------------------
   このファイルは「ベーススタイル（デスクトップ基準）」を先に
   すべて記述し、レスポンシブ上書きはファイル末尾の
   RESPONSIVE セクションに1本化しています。

     1024px以下 … タブレット（3〜4カラム→1〜2カラムなど）
      900px以下 … スマートフォン境界（ハンバーガーメニュー化・
                  hero全画面圧縮・各セクション1カラム化）
      640px以下 … 小型スマートフォン（ボタン幅・グリッド調整）

   旧バージョンで個別に使われていた 600px（flowグリッド）・
   480px（お問い合わせフォーム）は、上記640pxのタイルに統合して
   います。統合により、該当箇所が1カラムに切り替わるタイミングが
   従来よりわずかに広い画面幅（600→640px / 480→640px）に変わって
   います。挙動を変えたくない場合はお知らせください。

   上記3段階に加えて、ビューポート幅に依存しない例外条件
  （prefers-reduced-motion、高さ基準のhero調整）を
   OTHER CONDITIONS セクションにまとめています。
   ============================================================ */

/* ---------- Design tokens ---------------------------------- */
:root {
  /* Brand palette */
  --color-navy:        #3B4B78;
  --color-navy-deep:   #25325A;
  --color-blue-gray:   #7B8DB8;
  --color-silver-blue: #ACB7D2;
  --color-pale-blue:   #DAE1F3;

  /* Neutrals */
  --color-charcoal:    #3E3A39;
  --color-white:       #FFFFFF;
  --color-off-white:   #FAFAFA;
  --color-line:        #F2F2F2;
  --color-mid-gray:    #9D9D9D;

  /* Gradients */
  --grad-primary:     linear-gradient(36deg, #25325A 0%, #7B848C 100%);
  --grad-accent-text: linear-gradient(90deg, #3B4A78 0%, #8B96B3 100%);
  --grad-image-cover: linear-gradient(rgba(0,0,0,0) 0%, rgba(0,0,0,0.5) 100%);

  /* Type */
  --font-latin: "Jost", system-ui, sans-serif;
  --font-jp:    "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;

  /* Layout */
  --layout-max-page: 1440px;
  --side-pad: 90px;
  --section-pad: 150px;

  /* Shadows */
  --shadow-card:  0 0 25px 0 rgba(0,0,0,0.05);
  --shadow-value: 0 0 25px 0 rgba(0,0,0,0.06);
}

.sp-onliy {
  display: none;
}

/* ---------- Base ------------------------------------------- */
/* ※ 汎用リセットは reset.css に分離（先に読み込むこと） */

html { scroll-behavior: smooth; }

body {
  background: var(--color-off-white);
  color: var(--color-charcoal);
  font-family: var(--font-jp);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: .05em;
}

a { transition: opacity .2s ease; }
a:hover { opacity: .85; }
input::placeholder, textarea::placeholder { color: var(--color-mid-gray); }
input:focus, textarea:focus { outline: none; border-color: var(--color-navy); }
:focus-visible { outline: 2px solid var(--color-navy); outline-offset: 2px; }

.page {
  margin: 0 auto;
  background: var(--color-off-white);
  overflow-x: clip;
}

/* ---------- Preloader --------------------------------------
   ページの実体を隠す間、ブランドロゴをフルスクリーン表示。
   フォント/画像の準備が整い次第、JS(index.js)がフェードアウトさせる。
   ------------------------------------------------------------ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-primary);
  transition: opacity .6s ease, visibility .6s ease;
}
.preloader__mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: preloaderMarkIn 1s cubic-bezier(.22, 1, .36, 1) both;
}
.preloader__brand {
  font-family: var(--font-latin);
  font-weight: 300;
  font-size: clamp(40px, 8vw, 90px);
  letter-spacing: .2em;
  color: var(--color-white);
  line-height: 1;
}
.preloader__sub {
  font-family: var(--font-latin);
  font-weight: 400;
  font-size: clamp(14px, 2.2vw, 22px);
  letter-spacing: .3em;
  color: var(--color-silver-blue);
  line-height: 1;
}
@keyframes preloaderMarkIn {
  from { opacity: 0; transform: translateY(10px); letter-spacing: .4em; }
  to   { opacity: 1; transform: none; }
}
/* フェードアウト完了後（JSがclassを付与） */
.preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .preloader__mark { animation: none; }
}

/* ---------- Shared components ------------------------------ */

/* Section heading block (英字見出し + 日本語サブ) */
.sec-head { display: flex; flex-direction: column; gap: 15px; margin-bottom: 50px; }
.sec-head__eng {
  font-family: var(--font-latin);
  font-weight: 500;
  font-size: clamp(28px, 3.5vw, 35px);
  letter-spacing: .07em;
  line-height: 1;
  background: var(--grad-accent-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sec-head__eng--on-dark { background: none; -webkit-text-fill-color: currentColor; color: var(--color-white); }
.sec-head__sub { font-size: clamp(15px, 2vw, 17px); letter-spacing: .1em; color: var(--color-charcoal); line-height: 1.6; }
.sec-head--on-dark .sec-head__sub { color: var(--color-white); }

/* CTAボタン（グラデーションピル） */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 13px 13px 17px 30px;
  border-radius: 40px;
  background: var(--grad-primary);
  color: var(--color-white);
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: .04em;
  line-height: 1;
  border: none;
  cursor: pointer;
  width: fit-content;
  transition: opacity .2s ease, transform .2s ease;
}
.btn-cta:hover {
  opacity: .85;
}
.btn-cta .arrow-circle {
  width: 35px;
  height: 35px;
  border: 1px solid var(--color-white);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- Header ----------------------------------------- */
/* 追従ヘッダー：下スクロールで隠れ、上スクロールで再表示（JS連動） */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 30px var(--side-pad);
  z-index: 100;
  transition: transform .3s ease, background-color .3s ease,
              box-shadow .3s ease, padding .3s ease;
}

/* 下スクロール中は画面外へ退避 */
.site-header.is-hidden {
  transform: translateY(-100%);
}

/* ページ上端以外では背景を敷いて、どのセクション上でも読めるように */
.site-header.is-scrolled {
  padding-top: 16px;
  padding-bottom: 16px;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 20px rgba(0,0,0,0.06);
}

/* モバイルメニュー展開中：
   ヘッダーのtransform/backdrop-filterはfixed子要素(全画面メニュー)の
   基準を狂わせるため無効化し、ヘッダー自体も必ず表示状態に固定する */
.site-header.menu-open {
  transform: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-header__logo {
  font-family: var(--font-latin);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.site-header__right { display: flex; align-items: center; gap: 20px; }

.global-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border-radius: 30px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.global-nav a {
  display: inline-flex;
  align-items: center;
  padding: 11px 20px;
  border-radius: 24px;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .04em;
  color: var(--color-charcoal);
  line-height: 1;
  white-space: nowrap;
  transition: background-color .2s ease;
}
.global-nav a:hover {
  background: rgba(59,75,120,0.1);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  padding: 10px 10px 13px 25px;
  border-radius: 40px;
  background: var(--grad-primary);
  color: var(--color-white);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .04em;
  line-height: 1;
  white-space: nowrap;
}
.header-cta .arrow-circle {
  width: 30px; height: 30px;
  border: 1px solid var(--color-white);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ハンバーガー（モバイルのみ表示） */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
  position: relative;
  z-index: 12;
  flex-shrink: 0;
}
.nav-toggle span {
  position: absolute;
  left: 12px; right: 12px;
  height: 2px;
  background: var(--color-navy);
  border-radius: 1px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 26px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Hero (全画面表示) -------------------------------
   訪問時のファーストビューを常にビューポート高ちょうどに。
   高さの低い画面でも収まるよう、余白・文字サイズをsvh/dvh連動で圧縮。
   （コンテンツが物理的に収まらない極小画面のみmin-heightで伸長） */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--color-white);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url("../img/hero-bg.jpg");
  background-size: cover;
  background-position: center 20%;
  opacity: .85;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.9) 0%,
    rgba(255,255,255,0.55) 30%,
    rgba(255,255,255,0.2) 60%,
    rgba(110,120,146,0.55) 100%);
}
.hero__inner {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(100px, 15svh, 140px) var(--side-pad) clamp(20px, 4svh, 40px);
}
.hero__copy { display: flex; flex-direction: column; gap: clamp(14px, 2.4svh, 25px); max-width: 1260px; }
.hero__tagline {
  font-weight: 500;
  font-size: clamp(14px, 2vw, 18px);
  letter-spacing: .18em;
  line-height: 1.7;
  color: var(--color-navy);
}
.hero__title {
  font-family: var(--font-latin);
  font-weight: 300;
  font-size: clamp(44px, min(8vw, 10svh), 90px);
  letter-spacing: .07em;
  line-height: 1.05;
  color: var(--color-navy);
}
.hero__lead {
  font-weight: 500;
  font-size: clamp(17px, 2.5vw, 22px);
  letter-spacing: .1em;
  line-height: 1.6;
  color: var(--color-navy);
  margin-top: clamp(4px, 1.5svh, 15px);
}
.hero__desc {
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-charcoal);
  max-width: 620px;
}
.hero__actions { display: flex; align-items: center; gap: 40px; margin-top: 10px; }

/* 実績バンド */
.hero__stats {
  position: relative;
  z-index: 2;
  margin: 0 var(--side-pad) clamp(24px, 5svh, 50px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255,255,255,0.3);
  backdrop-filter: blur(11.5px);
  -webkit-backdrop-filter: blur(11.5px);
  border-radius: 5px;
  padding: clamp(16px, 2.6svh, 25px) 0;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
  border-right: 1px solid var(--color-pale-blue);
  text-align: center;
}
.stat:last-child { border-right: none; }
.stat__num {
  font-family: var(--font-latin);
  font-weight: 300;
  font-size: clamp(34px, min(4vw, 5svh), 48px);
  line-height: 1;
  color: var(--color-navy);
}
.stat__num .stat__unit {
  font-family: var(--font-jp);
  font-size: 16px;
  font-weight: 500;
}
.stat__label { font-size: 13px; letter-spacing: .05em; color: var(--color-charcoal); line-height: 1.6; }

/* ---------- Sections (共通レイアウト) ----------------------- */
.section { padding: var(--section-pad) var(--side-pad); }
/* 追従ヘッダーがあるため、アンカージャンプ位置に余白を確保
   （スクロール後のヘッダー実測高さ約90px + 見出し上の余白） */
[id] { scroll-margin-top: 0px; }
.section--white { background: var(--color-white); }
.section--off   { background: var(--color-off-white); }
.section--dark  { background: var(--grad-primary); }

/* ---------- Problem ---------------------------------------- */
.problem .sec-head { margin-bottom: 60px; }
.problem__lead {
  display: flex;
  align-items: center;
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--color-pale-blue);
}
.problem__num {
  font-family: var(--font-latin);
  font-weight: 300;
  font-size: clamp(80px, 12vw, 140px);
  line-height: 1;
  color: var(--color-white);
  flex-shrink: 0;
}
.problem__num small { font-size: .5em; font-weight: 300; }
.problem__lead p {
  font-size: 16px;
  line-height: 2;
  color: var(--color-white);
  max-width: 760px;
}
.problem__walls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px;
  padding-top: 60px;
}
.wall { display: flex; flex-direction: column; gap: 12px; }
.wall__eyebrow {
  font-family: var(--font-latin);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: .15em;
  color: var(--color-silver-blue);
  line-height: 1.4;
}
.wall__title { font-weight: 500; font-size: 22px; color: var(--color-white); line-height: 1.5; }
.wall__text { font-size: 14px; line-height: 1.9; color: var(--color-pale-blue); }

/* ---------- Service ---------------------------------------- */
.service__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.svc-card {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}
.svc-card__visual { position: relative; height: 240px; }
.svc-card__visual img { width: 100%; height: 100%; object-fit: cover; }
.svc-card__visual::after { content: ""; position: absolute; inset: 0; background: var(--grad-image-cover); }
.svc-card__eng {
  position: absolute;
  left: 25px; bottom: 20px;
  z-index: 1;
  font-family: var(--font-latin);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: .15em;
  color: var(--color-white);
  line-height: 1.4;
}
.svc-card__body { padding: 40px; display: flex; flex-direction: column; gap: 20px; flex: 1; }
.svc-card__title { font-weight: 500; font-size: 22px; letter-spacing: .05em; line-height: 1.4; color: var(--color-navy); }
.svc-card__desc { font-size: 15px; line-height: 1.9; color: var(--color-charcoal); }
.svc-card__points { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.svc-card__points li {
  display: flex;
  gap: 10px;
  list-style: none;
  font-size: 14px;
  color: var(--color-charcoal);
  line-height: 1.8;
}
.svc-card__points li::before { content: "・"; color: var(--color-blue-gray); flex-shrink: 0; }

/* ---------- Original Value --------------------------------- */
.value .sec-head { margin-bottom: 70px; }
.value__list { display: flex; flex-direction: column; gap: 70px; }
.value-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.value-card {
  background: var(--color-white);
  border-radius: 120px 20px 20px 20px;
  box-shadow: var(--shadow-value);
  padding: 60px;
}
.value-card__num {
  font-family: var(--font-latin);
  font-weight: 300;
  font-size: 60px;
  line-height: 1;
  background: var(--grad-accent-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 20px;
}
.value-card__title {
  font-weight: 500;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.5;
  letter-spacing: .05em;
  color: var(--color-charcoal);
  margin-bottom: 15px;
}
.value-card__text { font-size: 15px; line-height: 1.9; color: var(--color-charcoal); }
.value-row__img { width: 100%; height: 360px; object-fit: cover; border-radius: 10px; }

/* ---------- Case ------------------------------------------- */
.case__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.case-card {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: 10px;
  padding: 40px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.case-card__tag {
  align-self: flex-start;
  display: inline-flex;
  padding: 5px 10px 7px;
  background: var(--color-navy);
  color: var(--color-white);
  border-radius: 2px;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .05em;
  line-height: 1;
}
.case-card__title { font-weight: 500; font-size: 20px; line-height: 1.5; letter-spacing: .05em; color: var(--color-navy); }
.case-card__text { font-size: 14px; line-height: 1.9; color: var(--color-charcoal); }

/* ---------- Flow ------------------------------------------- */
.flow__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.flow-step {
  background: var(--color-off-white);
  border: 1px solid var(--color-line);
  border-radius: 10px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.flow-step__num {
  font-family: var(--font-latin);
  font-weight: 300;
  font-size: 44px;
  line-height: 1;
  color: var(--color-silver-blue);
}
.flow-step__title { font-weight: 500; font-size: 18px; letter-spacing: .05em; color: var(--color-navy); line-height: 1.5; }
.flow-step__text { font-size: 13px; line-height: 1.8; color: var(--color-charcoal); }
.flow__note { font-size: 14px; line-height: 1.9; color: var(--color-mid-gray); margin-top: 30px; }

/* ---------- Contact ---------------------------------------- */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 80px;
  align-items: start;
}
.contact__intro { display: flex; flex-direction: column; gap: 25px; align-self: center;}
.contact__eng {
  font-family: var(--font-latin);
  font-weight: 500;
  font-size: clamp(28px, 3.5vw, 35px);
  letter-spacing: .07em;
  line-height: 1;
  color: var(--color-white);
}
.contact__title {
  font-weight: 500;
  font-size: clamp(21px, 3vw, 26px);
  line-height: 1.6;
  letter-spacing: .05em;
  color: var(--color-white);
}
.contact__text { font-size: 15px; line-height: 1.9; color: var(--color-pale-blue); }

.contact__panel { background: var(--color-white); border-radius: 10px; padding: 50px; }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.contact-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.contact-form__field { display: flex; flex-direction: column; gap: 8px; }
.contact-form__field label { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 13px; letter-spacing: .05em; color: var(--color-charcoal); }
.required-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px 4px;
  border-radius: 3px;
  background: var(--color-navy);
  color: var(--color-white);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .05em;
  line-height: 1.6;
}
.contact-form__field input,
.contact-form__field textarea {
  border: 1px solid #c9c9c9;
  border-radius: 5px;
  padding: 12px 15px;
  font-family: var(--font-jp);
  font-size: 14px;
  background: var(--color-white);
  color: var(--color-charcoal);
}
.contact-form__field textarea { min-height: 130px; resize: vertical; }
.contact-form .btn-cta { justify-content: center; padding: 15px 40px 18px; margin: 0 auto;}
.contact-form__note {
  font-size: 12px;
  letter-spacing: .05em;
  color: var(--color-mid-gray);
  text-align: center;
  line-height: 1.6;
}

/* ---------- Footer ----------------------------------------- */
.site-footer { background: var(--color-charcoal); padding: 60px var(--side-pad) 40px; }
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}
.site-footer__brand { display: flex; flex-direction: column; gap: 12px; }
.site-footer__logo {
  font-family: var(--font-latin);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: .1em;
  color: var(--color-white);
  line-height: 1.4;
}
.site-footer__address { font-size: 13px; line-height: 1.8; color: var(--color-mid-gray); }
.site-footer__nav { display: flex; gap: 30px; flex-wrap: wrap; transition: color .2s ease; }
.site-footer__nav a { font-size: 13px; letter-spacing: .05em; color: var(--color-white); text-decoration: underline; }
.site-footer__nav a:hover { color: var(--color-silver-blue); opacity: 1; text-decoration: none;}

/* 外部リンクアイコン（target="_blank" のリンクのみ） */
.site-footer__nav a[target="_blank"] {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.site-footer__nav a[target="_blank"]::after {
  content: "";
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='m256-240-56-56 384-384H240v-80h480v480h-80v-344L256-240Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='m256-240-56-56 384-384H240v-80h480v480h-80v-344L256-240Z'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.site-footer__copy {
  font-family: var(--font-latin);
  font-size: 12px;
  letter-spacing: .07em;
  color: var(--color-mid-gray);
  margin-top: 50px;
  text-align: center;
}

/* プライバシーポリシー同意チェック */
.contact-form__consent {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: .05em;
  color: var(--color-charcoal);
}
.contact-form__consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 5px; /* ラベル1行目の文字と高さを揃える */
  border: 1px solid #c9c9c9;
  border-radius: 3px;
  background-color: var(--color-white);
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease;
}
.contact-form__consent input[type="checkbox"]:checked {
  background-color: var(--color-navy);
  border-color: var(--color-navy);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.3 L5.6 10.4 L11.5 3.9' fill='none' stroke='%23FFFFFF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
}
.contact-form__consent label {
  cursor: pointer;
}
.contact-form__consent a {
  color: var(--color-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.contact-form__consent .required-badge {
  margin-left: 8px;
  vertical-align: 2px;
}

/* ============================================================
   ANIMATIONS
   1) Hero：ページ表示時に上からフェードイン（CSSキーフレーム）
   2) スクロール連動リビール：JS（IntersectionObserver）が
      対象要素に .anim を付与 → 表示域に入ると .is-inview を追加
   3) 数字カウントアップ：hero実績・PROBLEMの95%（JS制御）

   ※ JSが無効な環境では .anim が付与されないため、
     コンテンツは通常どおり最初から表示されます。
   ※ prefers-reduced-motion 時は reset.css の一括指定により
     duration が実質0になり、即時表示になります。
   ============================================================ */

/* ---- 1) Hero ロードイン ---- */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
.hero__tagline,
.hero__title,
.hero__lead,
.hero__desc,
.hero__actions,
.hero__stats {
  animation: heroFadeUp .9s cubic-bezier(.22, 1, .36, 1) both;
}
.hero__tagline { animation-delay: .10s; }
.hero__title   { animation-delay: .25s; }
.hero__lead    { animation-delay: .45s; }
.hero__desc    { animation-delay: .60s; }
.hero__actions { animation-delay: .75s; }
.hero__stats   { animation-delay: .90s; animation-duration: 1s; }

/* ---- 2) スクロール連動リビール ---- */
/* .anim はJSが付与（HTML編集不要）。stagger（時間差）はJSが
   transition-delay をインラインで設定する */
.anim {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity  .8s cubic-bezier(.22, 1, .36, 1),
    transform .8s cubic-bezier(.22, 1, .36, 1);
}
.anim.is-inview {
  opacity: 1;
  transform: none;
}

/* ---- 3) カウントアップ ---- */
/* 桁が動いてもガタつかないよう等幅数字にする */
.stat__num,
.problem__num {
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   お問い合わせフォーム インラインバリデーション ＋ 同意欄
   ★ /contact/（contact.css）の体裁に一致させた版。
     前回 style.css 末尾に貼った検証ブロックを、この全体で
     「丸ごと差し替え」てください。
   ============================================================ */

/* ---- エラーメッセージ（フィールド下・左寄せ・赤字 #dc3545） ---- */
.contact-form__error {
  display: block;
  color: #dc3545;
  font-size: 13px;
  margin-top: 6px;
  min-height: 0;
  text-align: left;
}
.contact-form__error:empty { display: none; }
.contact-form__error:not(:empty) { animation: formFadeIn 0.3s ease-out; }

/* ---- 入力欄エラー（赤枠＋淡い赤背景 #fffafa ＋シェイク） ---- */
.contact-form__field input.is-error,
.contact-form__field textarea.is-error {
  border-color: #dc3545;
  background-color: #fffafa;
  animation: formShake 0.4s ease;
}
.contact-form__field input.is-error:focus,
.contact-form__field textarea.is-error:focus {
  outline: none;
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, .12);
}

/* ---- エラー通知バナー（左端の赤い縦帯のみ・左寄せ・右角丸＝/contact/ 準拠） ---- */
/* 表示位置は page-training.php 側で送信ボタン直上に配置 */
.contact-form__notification {
  background-color: #fef2f2;
  border: none;
  border-left: 4px solid #dc3545;
  border-radius: 0 8px 8px 0;
  padding: 14px 20px;
  margin-bottom: 24px;
}
.contact-form__notification p {
  font-size: 14px;
  font-weight: 500;
  color: #dc3545;
  margin: 0;
  text-align: left;
}

/* ---- 同意チェック：初期はプレーン → ホバーで色 → チェックでホバー色を維持 ---- */
/* 既存の中央寄せ指定を上書き（このブロックは style.css 末尾のため後勝ち） */
.contact-form__consent {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 6px;
  background-color: transparent;   /* 初期は色なし（プレーン） */
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: .05em;
  color: var(--color-charcoal);
  cursor: default;
  transition: background-color .25s ease, box-shadow .25s ease;
}
/* 中央寄せ時に付けていた上マージンを解除（align-items:center 用） */
.contact-form__consent input[type="checkbox"] {
  margin-top: 0;
}
/* ホバー：色が付く */
.contact-form__consent:hover {
  background-color: #f4f5fa;
}
/* チェック時：ホバー時と同じ色を維持（カーソルを外しても残る） */
.contact-form__consent:has(input:checked) {
  background-color: #f4f5fa;
}
/* エラー時：赤の淡い背景＋赤の内側リング（レイアウトずれ防止に box-shadow を使用） */
.contact-form__consent.is-error {
  background-color: #fffafa;
  box-shadow: inset 0 0 0 1.5px #dc3545;
}

/* ---- 送信ボタン：送信中（無効化） ---- */
.contact-form .btn-cta:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* ---- アニメーション（/contact/ と同一） ---- */
@keyframes formFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes formShake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}

/* ============================================================
   RESPONSIVE
   1024px → 900px → 640px の順（広い方から狭い方へ）。
   同じ幅で複数条件が重なっても、後に書かれた狭い方が
   意図通り上書きされるようこの順序を保ってください。
   ============================================================ */

/* ========== 1024px以下（タブレット） ========== */
@media (max-width: 1024px) {
  :root { --side-pad: 40px; --section-pad: 100px; }

  /* Case */
  .case__grid { grid-template-columns: 1fr; }
  .case-card { padding: 30px 24px; }

  /* Flow */
  .flow__grid { grid-template-columns: 1fr 1fr; }
}

/* ========== 900px以下（スマートフォン境界） ========== */
@media (max-width: 900px) {
  /* Header */
  .site-header { padding: 20px var(--side-pad); }
  .nav-toggle { display: block; }
  .site-header__right {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 40px;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
    z-index: 11;
  }
  .site-header__right.is-open { opacity: 1; visibility: visible; }
  .global-nav {
    flex-direction: column;
    gap: 4px;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
  }
  .global-nav a { font-size: 17px; padding: 12px 24px; }

  /* Hero：画面高さが低い端末（Safari/Chromeのツールバー表示時など）でも
     hero全体（ヘッダー〜実績バンド）が1画面に収まるよう、
     文字サイズ・余白をdvh基準で圧縮する */
  .hero__inner {
    padding-top: clamp(64px, 11dvh, 96px);
    padding-bottom: clamp(10px, 1.6dvh, 24px);
  }
  .hero__copy { gap: clamp(8px, 1.6dvh, 20px); }
  .hero__tagline {
    font-size: clamp(12px, 3.4vw, 15px);
    line-height: 1.5;
  }
  .hero__title {
    font-size: clamp(30px, min(9vw, 6.4dvh), 64px);
    line-height: 1.08;
  }
  .hero__lead {
    font-size: clamp(15px, 4vw, 18px);
    margin-top: clamp(0px, 0.8dvh, 10px);
  }
  .hero__desc {
    font-size: clamp(13px, 3.3vw, 14px);
    line-height: 1.6;
  }
  .hero__actions { margin-top: clamp(0px, 0.8dvh, 8px); }
  .hero__actions .btn-cta { padding: 11px 11px 11px 22px; }

  .hero__stats {
    grid-template-columns: 1fr 1fr;
    gap: clamp(10px, 1.8dvh, 20px) 0;
    padding: clamp(10px, 1.6dvh, 18px) 0;
  }
  .stat:nth-child(2) { border-right: none; }
  .stat__num { font-size: clamp(26px, 7vw, 34px); }
  .stat__label { font-size: clamp(10.5px, 2.6vw, 12px); line-height: 1.4; }

  /* Problem */
  .problem__lead { flex-direction: column; align-items: flex-start; gap: 25px; padding-bottom: 45px; }
  .problem__walls { grid-template-columns: 1fr; gap: 40px; padding-top: 45px; }

  /* Service */
  .service__grid { grid-template-columns: 1fr; }
  .svc-card__body { padding: 30px 24px; }

  /* Original Value */
  .value .sec-head { margin-bottom: 50px; }
  .value__list { gap: 50px; }
  .value-row { grid-template-columns: 1fr; gap: 25px; }
  /* モバイルでは常にカード→画像の順に */
  .value-row--reverse .value-row__img { order: 2; }
  .value-card { border-radius: 80px 20px 20px 20px; padding: 40px 28px; }
  .value-row__img { height: 240px; }

  /* Contact */
  .contact__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    width: 100%;
    min-width: 0;
  }

  .contact__intro,
  .contact__panel {
    width: 100%;
    min-width: 0;
  }

  .contact__panel {
    padding: 32px 24px;
  }

  .contact-form,
  .contact-form__row,
  .contact-form__field {
    min-width: 0;
  }

  .contact-form__field input,
  .contact-form__field textarea {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .required-badge {
    margin-top: 4px;
  }

  /* Footer */
  .site-footer__inner { flex-direction: column; gap: 30px; }

  [id] { scroll-margin-top: 20px; }
}

/* ========== 640px以下（小型スマートフォン） ========== */
@media (max-width: 640px) {
  :root { --side-pad: 24px; --section-pad: 70px; }

  [id] { scroll-margin-top: 80px; }

  /* Hero */
  .hero__actions .btn-cta {
    width: auto;
    margin: 0 auto;
    padding: 12px 32px 16px;
    justify-content: space-between;
    border: 1px solid #b4c5d7;
  }
  .sp-onliy {
    display: block;
  }

  /* Flow（旧: 600px以下から統合） */
  .flow__grid { grid-template-columns: 1fr; }

  /* Contact（旧: 480px以下から統合） */
  .contact-form__row { grid-template-columns: 1fr; }
}


/* ============================================================
   OTHER CONDITIONS
   ビューポート「幅」の3段階ブレークポイントとは別軸の、
   個別条件による上書き。
   ============================================================ */

/* OSの「視差効果を減らす」設定への対応 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* 高さの低いデスクトップ/ノートPC画面（901px以上×760px以下）では
   リード文などを1画面に収まるよう少し縮める */
@media (min-width: 901px) and (max-height: 760px) {
  .hero__desc { font-size: 14px; line-height: 1.7; }
  .hero__lead { font-size: 17px; }
  .stat__label { font-size: 12px; }
}