/* ==========================================================================
   全ページ共通スタイル
   - 色・文字・余白などの値はデザインシステムのトークン（vendor/design-system/tokens/*.css）の CSS 変数を使う
   - 各ページの <head> で、ページ別 CSS より先に読み込む
   ========================================================================== */

/* --------------------------------------------------------------------------
   ベース
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

a {
  color: var(--text-link);
}

a:hover {
  color: var(--text-link-hover);
}

/* --------------------------------------------------------------------------
   アニメーション
   -------------------------------------------------------------------------- */
/* 下からふわっと出現 */
@keyframes swRise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* 下から伸びる（棒グラフ） */
@keyframes swBar {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

/* 「動きを減らす」設定の利用者にはアニメーションを止める */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
}

/* --------------------------------------------------------------------------
   サイト全体の枠
   ※ ヘッダー・見出し帯・CTA・フッターは、検索エンジンが読み取れるよう各ページの HTML に直接書いている。
     全ページ同じ内容なので、変更するときは全ページを同じように直すこと
   -------------------------------------------------------------------------- */
.site {
  --sy: 0; /* スクロール量。js/site-layout.js がスクロールに合わせて更新する */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 固定ヘッダー */
.site__header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background var(--dur-base) var(--ease-out);
}

/* PC・タブレット用ヘッダー（デザインシステムの SiteHeader と同じ見た目）
   最上部では透明、スクロール後（.is-scrolled）はガラス風 */
.site-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 var(--gutter);
  background: transparent;
}

.site-header.is-scrolled {
  background: var(--surface-glass);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
}

.site-header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-header__logo-img {
  display: block;
  height: 56px;
}

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

.site-header__nav {
  display: flex;
  gap: 32px;
}

/* ナビのリンク（現在のページとホバー時は青字＋下線） */
.site-header__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--sw-navy-800);
  text-decoration: none;
  transition: color var(--dur-fast);
}

.site-header__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}

.site-header__link:hover,
.site-header__link.is-current {
  color: var(--brand-primary);
}

.site-header__link:hover::after,
.site-header__link.is-current::after {
  transform: scaleX(1);
}

.site-header__actions {
  display: flex;
  gap: 10px;
}

.site__main {
  flex: 1;
}

/* 下層ページの見出し帯 */
.page-header {
  background: var(--surface-alt);
  padding: calc(var(--header-h) + 72px) var(--gutter) 72px;
}

/* カバー画像付きの見出し帯
   - 画像は各ページの CSS で `background-image: var(--cover-overlay), url(...)` として指定する
   - 文字が重なる側（PCは左と上端のヘッダー部分、スマホは上）を紙色で薄く覆い、見出し・メニューを読みやすくする
   - 紙色 #F7F5F0（--sw-paper）を半透明にした値 */
.page-header--cover {
  --cover-overlay:
    linear-gradient(180deg,
      rgba(247, 245, 240, .85) 0,
      rgba(247, 245, 240, 0) calc(var(--header-h) + 48px)),
    linear-gradient(90deg,
    rgba(247, 245, 240, .94) 0%,
    rgba(247, 245, 240, .82) 38%,
    rgba(247, 245, 240, 0) 68%);
  display: flex;
  align-items: center;
  min-height: 440px;
  background-size: cover;
  background-position: center;
}

.page-header--cover > .container {
  width: 100%;
}

/* フッター（デザインシステムの SiteFooter と同じ見た目。ロゴは表示しない） */
.site-footer {
  background: var(--surface-inverse);
  color: #fff;
  padding: 72px var(--gutter) 32px;
}

.site-footer__inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 48px;
}

.site-footer__address {
  min-width: 240px;
  font-size: 13px;
  font-style: normal;
  line-height: 1.9;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .75);
}

.site-footer__cols {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 120px;
}

.site-footer__col-title {
  font-family: var(--font-latin);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--sw-blue-300);
}

.site-footer__link,
.site-footer__link:hover {
  color: #fff;
  font-size: 14px;
  letter-spacing: .06em;
  text-decoration: none;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .15);
  font-size: 12px;
  color: rgba(255, 255, 255, .6);
}

/* フッター下部のリンク（お問い合わせガイドライン・プライバシーポリシー） */
.site-footer__legal,
.site-footer__legal:hover {
  color: inherit;
  letter-spacing: .06em;
  text-decoration: none;
}

.site-footer__legal:hover {
  color: #fff;
}

.site-footer__copyright {
  font-family: var(--font-latin);
  letter-spacing: .06em;
}

/* お問い合わせへの誘導帯 */
.cta {
  max-width: var(--container-max);
  margin: 0 auto;
  background: var(--sw-blue-500);
  border-radius: var(--radius-xl);
  padding: 64px clamp(28px, 6vw, 80px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
}

/* --------------------------------------------------------------------------
   レイアウト部品
   -------------------------------------------------------------------------- */
/* セクション（上下の余白と左右のガター） */
.section {
  padding: var(--section-y) var(--gutter);
}

.section--alt {
  background: var(--surface-alt);
}

/* コンテンツ幅の中央寄せ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* 縦積み（子要素の間隔を揃える） */
.stack {
  display: flex;
  flex-direction: column;
}

.stack--4   { gap: 4px; }
.stack--6   { gap: 6px; }
.stack--10  { gap: 10px; }
.stack--12  { gap: 12px; }
.stack--14  { gap: 14px; }
.stack--16  { gap: 16px; }
.stack--28  { gap: 28px; }
.stack--32  { gap: 32px; }
.stack--40  { gap: 40px; }
.stack--48  { gap: 48px; }
.stack--56  { gap: 56px; }
.stack--section { gap: var(--space-9); } /* ページ内の大きな区切り */

/* --------------------------------------------------------------------------
   セクション見出し（デザインシステムの SectionHeading と同じ見た目）
   英字の小見出し（eyebrow）＋ 見出し ＋ リード文
   -------------------------------------------------------------------------- */
.section-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
}

.section-heading__eyebrow {
  margin: 0;
  font-family: var(--font-latin);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: var(--ls-eyebrow);
  color: var(--brand-primary);
}

.section-heading__title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: var(--ls-heading);
  color: var(--text-heading);
}

.section-heading__lead {
  margin: 14px 0 0;
  max-width: 640px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-body);
  text-wrap: pretty;
}

/* 濃い背景の上に置く場合 */
.section-heading--inverse .section-heading__eyebrow {
  color: var(--sw-blue-200);
}

.section-heading--inverse .section-heading__title {
  color: #fff;
}

.section-heading--inverse .section-heading__lead {
  color: rgba(255, 255, 255, .85);
}

/* --------------------------------------------------------------------------
   カード（デザインシステムの Card〈elevated・リンクなし〉と同じ見た目）
   -------------------------------------------------------------------------- */
.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  box-shadow: var(--shadow-md);
}

.card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 26px 26px;
}

.card__eyebrow {
  margin: 0;
  font-family: var(--font-latin);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .16em;
  color: var(--brand-primary);
}

.card__title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .06em;
  color: var(--text-heading);
}

.card__content {
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-body);
}

/* --------------------------------------------------------------------------
   テキスト
   -------------------------------------------------------------------------- */
/* 本文 */
.body-text {
  margin: 0;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-body);
  text-wrap: pretty;
}

/* 注記（※ …） */
.note {
  margin: 0;
  font-size: var(--fs-small);
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   画像・動画の仮枠（差し替え前の斜線柄）
   -------------------------------------------------------------------------- */
.media-placeholder {
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-placeholder--paper {
  background: repeating-linear-gradient(135deg, var(--sw-paper) 0 10px, var(--sw-paper-2) 10px 20px);
}

.media-placeholder--blue {
  background: repeating-linear-gradient(135deg, var(--sw-blue-50) 0 10px, var(--sw-blue-100) 10px 20px);
}

.media-placeholder__label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  background: var(--sw-white);
  padding: 6px 10px;
  border-radius: 6px;
}

.media-placeholder--blue .media-placeholder__label {
  color: var(--sw-blue-700);
}

/* ==========================================================================
   レスポンシブ（モバイル対応）
   - ブレイクポイント: 767px 以下 = スマホ（ハンバーガーメニュー）、768px 以上 = タブレット・PC
     ※ js/site-layout.js の matchMedia('(min-width: 768px)') と合わせること
   - 768px 以上の見た目は変えない（スマホ用の指定はすべてメディアクエリ内に書く）
   ========================================================================== */

/* --------------------------------------------------------------------------
   スマホ用ヘッダー・メニュー（PC・タブレットでは非表示）
   -------------------------------------------------------------------------- */
.mobile-header,
.mobile-menu {
  display: none;
}

@media (max-width: 767px) {
  .site {
    --header-h: 64px; /* スマホではヘッダーを低くする（見出し帯・ヒーローの余白もこの値に連動） */
  }

  .site__header-desktop {
    display: none;
  }

  /* ヘッダー本体（ロゴ ＋ メニューボタン） */
  .mobile-header {
    position: relative;
    z-index: 1; /* メニューパネルより手前 */
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    padding: 0 var(--gutter);
    background: transparent;
    transition: background var(--dur-base) var(--ease-out);
  }

  /* スクロール後はガラス風、メニューを開いたら白 */
  .mobile-header.is-scrolled {
    background: var(--surface-glass);
    backdrop-filter: blur(var(--blur-glass));
    -webkit-backdrop-filter: blur(var(--blur-glass));
  }

  .mobile-header.is-open {
    background: var(--sw-white);
  }

  .mobile-header__logo {
    display: flex;
    align-items: center;
  }

  .mobile-header__logo-img {
    display: block;
    height: 40px;
  }

  /* メニューボタン（タップしやすい 48px 四方） */
  .mobile-header__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-right: -12px; /* アイコンの見た目の位置を余白に揃える */
    padding: 0;
    border: none;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--sw-navy-800);
    cursor: pointer;
  }

  .mobile-header__toggle:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
  }

  /* メニューパネル（ヘッダーの下に画面いっぱい） */
  .mobile-menu {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 8px var(--gutter) 40px;
    overflow-y: auto;
    background: var(--sw-white);
    /* 閉じている間は見えず、操作・読み上げの対象にもならない */
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition:
      opacity var(--dur-base) var(--ease-out),
      transform var(--dur-base) var(--ease-out),
      visibility 0s linear var(--dur-base);
  }

  .mobile-menu.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition:
      opacity var(--dur-base) var(--ease-out),
      transform var(--dur-base) var(--ease-out),
      visibility 0s;
  }

  .mobile-menu__list {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .mobile-menu__link {
    display: block;
    padding: 18px 0;
    border-bottom: 1px solid var(--border-default);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: var(--ls-heading);
    color: var(--sw-navy-800);
    text-decoration: none;
  }

  .mobile-menu__link.is-current {
    color: var(--brand-primary);
  }

  /* メニューを開いている間は背面のページをスクロールさせない */
  html.is-menu-open {
    overflow: hidden;
  }

  /* ------------------------------------------------------------------------
     共通レイアウトの余白をスマホ向けに詰める
     ------------------------------------------------------------------------ */
  .page-header {
    padding: calc(var(--header-h) + 40px) var(--gutter) 48px;
  }

  /* スマホでは正方形の画像を使い、帯も画面幅と同じ高さにする。文字は上側に重なる */
  .page-header--cover {
    --cover-overlay: linear-gradient(180deg,
      rgba(247, 245, 240, .94) 0%,
      rgba(247, 245, 240, .86) 50%,
      rgba(247, 245, 240, .3) 75%,
      rgba(247, 245, 240, 0) 90%);
    align-items: flex-start;
    min-height: 100vw;
    background-position: center bottom;
  }

  .cta {
    padding: 40px 24px;
    gap: 24px;
  }
}
