@charset "UTF-8";

/* ============================================================
   iCareGym 共通スタイル（画面設計「iCG Website-0927」版）
   全ページで共有する部品（トークン・ヘッダー・お問い合わせタブ・
   セクション見出し・フッター・トースト）をまとめる。ページ固有の
   部品は home.css などのページ別ファイルに書く。
   デザイン画は幅4267pxで、これを 1440px 幅のデスクトップとして
   実測している（実寸 ÷ 約2.96）。外部フォントは使わない。
   ブレークポイントは 1024px（タブレット）と 767px（スマートフォン）。
   ============================================================ */

/* ---------- デザイントークン ---------- */
:root {
  /* ブランドカラー（デザイン画の実測値） */
  --c-blue:        #1468b4;
  --c-blue-hover:  #0f5797;
  --c-green:       #28a038;  /* 見出しの明るい緑・1006版の「Shop on amazon」 */
  --c-green-hover: #218530;  /* 設計図に無いため、青と同じ程度に暗くした値 */
  --c-green-deep:  #246838;  /* ロゴの「Gym」・フッターの標語 */
  --c-orange:      #f0a434;

  /* 文字色 */
  --c-ink:         #444444;  /* ナビ・フッターなど */
  --c-ink-body:    #5c5c5c;  /* 本文 */
  --c-ink-faint:   #a4a4a4;  /* 免責文 */

  /* 背景 */
  --c-bg:          #ffffff;
  --c-bg-outside:  #eef1f4;  /* 最大幅（--page-max）より広い画面で、ページの両側に出る余白 */
  --c-bg-footer:   #ecece4;
  --c-panel:       #eaf4f9;
  --c-panel-alt:   #f3f8fc;
  --c-line:        #acacac;
  --c-line-soft:   #e3e9ee;

  /* 余白スケール */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;

  /* 角丸 */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 24px;
  --r-pill: 999px;

  /* その他 */
  --page-max: 1440px;   /* ページの最大幅（画面設計の幅）。これより広い画面ではページを中央に置き、両側を余白にする */
  --container: 1320px;
  --gutter: 24px;

  --font-ja: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium",
             "Yu Gothic", "Noto Sans JP", Meiryo, system-ui, sans-serif;
  --font-mincho: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho",
                 "YuMincho", "Noto Serif JP", serif;
  /* デザイン画の英文見出しは Minion 系のセリフ体。手元に無ければ Georgia で代替する。 */
  --font-en: "Minion Pro", "Georgia", "Times New Roman", serif;
}

/* ---------- リセット ---------- */
*, *::before, *::after { box-sizing: border-box; }

/* ページの最大幅（issue #11）。html を余白の色で塗り、body（白地のページ）を --page-max で中央に置く。
   はみ出しは body の端で切る。html を clip にしておくと body の overflow が画面全体に移らず、body 自身の端で切れる。
   hidden ではなく clip にするのは、hidden だと body がスクロールの箱になり、タブレット以下の sticky のヘッダーが効かなくなるため。 */
html {
  -webkit-text-size-adjust: 100%; scroll-behavior: smooth;
  background: var(--c-bg-outside);
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-ja);
  font-size: 16px;
  line-height: 1.9;
  color: var(--c-ink);
  background: var(--c-bg);
  max-width: var(--page-max);
  margin-inline: auto;
  overflow-x: clip; /* 縦組みブロックや透かし文字のはみ出しで横スクロールを起こさない（上の html のコメントを参照） */
  /* Chrome は既定で「、」「。」などの約物を詰める。デザイン画は約物を詰めない組版で、
     詰めると縦組みの1列の字数がデザイン画とずれるため、詰めない指定にする。 */
  text-spacing-trim: space-all;
}

img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- 共通ユーティリティ ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: var(--sp-4); top: -100px; z-index: 100;
  padding: var(--sp-2) var(--sp-4);
  background: var(--c-blue); color: #fff; border-radius: var(--r-sm);
  transition: top .15s ease;
}
.skip-link:focus { top: var(--sp-4); }

:focus-visible {
  outline: 3px solid var(--c-blue);
  outline-offset: 2px;
  border-radius: 2px;
}

/* 文字色の指定（2色見出しの塗り分けに使う） */
.is-blue   { color: var(--c-blue); }
.is-green  { color: var(--c-green); }
.is-deep   { color: var(--c-green-deep); }
.is-orange { color: var(--c-orange); }

/* 番地などを途中で折り返さない */
.nowrap { white-space: nowrap; }

/* 縦組みの中でラテン文字を1文字ずつ正立させる（デザイン画の「ｉＣＧ」の見え方） */
.upright { text-orientation: upright; }

/* 縦中横（縦組み内で短いラテン文字・数字を横並びにする）。WordPress 版では
   icaregym_tcy_auto() が半角英数1〜3字を自動でこのクラスで囲む。横組みでは効果が無い。 */
.tcy { text-combine-upright: all; -webkit-text-combine: horizontal; }

/* SVGアイコンの既定：線画 */
.icon {
  width: 1em; height: 1em;
  fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.icon--fill { fill: currentColor; stroke: none; }
.icon--fill .hole { fill: #fff; }
.icon--fill .stroke { fill: none; stroke: #fff; stroke-width: 1.6; }
.icon--fill .stroke--light { stroke-width: 1.2; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-2);
  min-height: 46px;
  border: 0; border-radius: var(--r-pill);
  padding: 8px 26px;
  font-size: 17px; font-weight: 500; line-height: 1.4;
  letter-spacing: .06em;
  cursor: pointer;
  transition: background-color .18s ease, transform .18s ease;
}
.btn .icon { width: 1.3em; height: 1.3em; }
.btn--primary { background: var(--c-blue); color: #fff; }
.btn--primary:hover { background: var(--c-blue-hover); }
/* 1006版のヘッダー右上「Shop on amazon」。大きさと位置は0927版の「資料ダウンロード」と同じ */
.btn--green { background: var(--c-green); color: #fff; }
.btn--green:hover { background: var(--c-green-hover); }
.btn:active { transform: translateY(1px); }

/* ---------- セクション見出し（英文2色＋日本語の小見出し） ---------- */
.section-title { text-align: center; }
.section-title__en {
  font-family: var(--font-en);
  font-size: clamp(34px, 4.1vw, 60px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .005em;
  color: var(--c-blue);
}
.section-title__ja {
  margin-top: var(--sp-3);
  font-size: clamp(18px, 2vw, 28px);
  letter-spacing: .06em;
  line-height: 1.5;
  color: var(--c-ink-body);
}

/* 見出しの背後に敷く薄い「iCG」の透かし文字（全ページ共通の装飾） */
.watermark {
  position: absolute;
  z-index: -1;
  font-family: var(--font-ja);
  font-weight: 700;
  font-size: clamp(160px, 22vw, 320px);
  line-height: .8;
  letter-spacing: -.02em;
  color: rgba(140, 160, 180, .1);
  pointer-events: none;
  user-select: none;
}

/* 葉と空の帯（bg-leaves.jpg）。デザイン画では素材を左右反転し、枝を左側に置いて
   使っているため、文字まで反転しないよう疑似要素の背景だけを反転させる。 */
.leaves-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.leaves-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: #f4f8fb url("assets/bg-leaves.jpg") center / cover no-repeat;
  transform: scaleX(-1);
}

/* ============================================================
   ヘッダー
   ============================================================ */
.site-header {
  position: relative;
  z-index: 20;
  /* デスクトップでは背景を敷かない。ヒーローの縦組み見出しがヘッダー右の
     余白へ食い込むデザインのため、白面で覆うと文字が隠れてしまう。 */
  background: transparent;
  padding-block: 68px 32px;
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  column-gap: 46px;
}

.site-header__logo img { width: 196px; height: auto; }

/* デスクトップ：ナビは縦一列（デザイン画準拠）、補助アクションは右上に配置 */
.global-nav { display: contents; }
.global-nav__list {
  /* 補助アクションと同じ行に置き、右上のボタン群と横に並べる */
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding-top: 14px;
}
.global-nav__list a {
  display: inline-block;
  padding: 2px 1px;
  border-bottom: 1px solid transparent;
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: .06em;
  color: var(--c-ink);
  transition: color .15s ease, border-color .15s ease;
}
.global-nav__list a:hover { color: var(--c-blue); border-bottom-color: var(--c-blue); }
.global-nav__list a[aria-current="page"] { color: var(--c-blue); font-weight: 700; }

.global-nav__actions {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  padding-top: 22px;
}
.global-nav__actions .btn {
  min-height: 52px;
  padding-inline: 30px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .12em;
}
/* 英文の「Shop on amazon」（1006版）は字間を詰めて組まれている */
.global-nav__actions .btn:lang(en) { letter-spacing: .02em; }

/* 言語切替 */
.lang-switch { position: relative; }
.lang-switch__button {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 0; cursor: pointer;
  padding: 6px 4px;
  font-size: 17px; color: var(--c-ink);
}
.lang-switch__button .icon { width: 24px; height: 24px; stroke-width: 1.4; }
.lang-switch__button .icon--caret { width: 16px; height: 16px; transition: transform .18s ease; }
.lang-switch__button[aria-expanded="true"] .icon--caret { transform: rotate(180deg); }
.lang-switch__current { font-weight: 600; letter-spacing: .04em; }

.lang-switch__menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 30;
  min-width: 172px;
  padding: var(--sp-2);
  background: #fff;
  border: 1px solid var(--c-line-soft);
  border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(35, 49, 59, .12);
}
.lang-switch__menu button {
  display: block; width: 100%;
  padding: 8px 10px;
  background: none; border: 0; border-radius: var(--r-sm);
  font-size: 14px; text-align: left; cursor: pointer;
}
.lang-switch__menu button:hover { background: var(--c-panel-alt); }
.lang-switch__menu button[aria-current="true"] { color: var(--c-blue); font-weight: 700; }

/* ハンバーガー（デスクトップでは非表示） */
.nav-toggle { display: none; }

/* ============================================================
   固定お問い合わせタブ
   ページによって左右どちらに付くかが違う（デザイン画の不統一）。
   既定は左端で、右端のページは .contact-tab--right を付ける。
   ============================================================ */
.contact-tab {
  position: fixed;
  /* ページ（最大 --page-max で中央）の左端。固定の要素の % は画面の幅が基準なので、画面がページより狭いときは 0 */
  left: max(0px, (100% - var(--page-max)) / 2); top: 52%;
  z-index: 40;
  display: grid; place-items: center;
  padding: 30px 30px;
  border: 0;  /* 行き先が未定の間は <button>（「準備中」の通知）にしているため */
  background: var(--c-blue); color: #fff;
  box-shadow: 0 4px 16px rgba(20, 104, 180, .28);
  cursor: pointer;
  transition: background-color .18s ease;
}
.contact-tab:hover { background: var(--c-blue-hover); }
.contact-tab--right { left: auto; right: max(0px, (100% - var(--page-max)) / 2); }
.contact-tab__text {
  writing-mode: vertical-rl;
  font-size: 22px; font-weight: 700; letter-spacing: .2em;
  line-height: 1;
}

/* ============================================================
   フッター
   ============================================================ */
.site-footer {
  padding-block: 34px 40px;
  background: var(--c-bg-footer);
  font-feature-settings: "palt"; /* デザイン画のフッターは約物を詰めた組版 */
}

.site-footer__inner {
  display: grid;
  /* デザイン画の並び: ロゴ＋リンク → 標語と会社情報 → QR。
     標語の列はデザイン画どおり左から約607pxの位置に始まるよう、1列目の幅を固定する。 */
  grid-template-columns: minmax(0, 490px) minmax(0, 1fr) auto;
  column-gap: var(--sp-6);
  align-items: start;
}

/* ロゴの右下にリンクの列が始まる配置 */
.site-footer__brand {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  column-gap: 12px;
  align-items: start;
  padding-right: var(--sp-6);
}
/* フッター用のロゴはベージュ地のまま切り出しているので、地色と同じ面に置ける */
.site-footer__logo { width: 196px; height: auto; }

.footer-nav { padding-top: 84px; }
.footer-nav ul { display: flex; flex-direction: column; gap: 5px; }
.footer-nav a,
.footer-nav button {
  display: inline-block;
  padding: 2px 1px;
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  font-size: 19px; line-height: 1.6;
  letter-spacing: .16em;
  text-align: left;
  color: var(--c-ink);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.footer-nav a:hover,
.footer-nav button:hover { color: var(--c-blue); border-bottom-color: var(--c-blue); }

.site-footer__tagline {
  font-family: var(--font-mincho);
  font-size: clamp(22px, 2.2vw, 31px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .2em;
  color: var(--c-blue);
}
.site-footer__slogan {
  margin-top: 2px;
  padding-left: .3em;
  font-family: var(--font-en);
  font-size: clamp(20px, 2vw, 29px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .06em;
  color: var(--c-blue);
}

.company { margin-top: 22px; }
.company__name {
  font-size: clamp(17px, 1.6vw, 23px);
  line-height: 1.85;
  letter-spacing: .1em;
  color: var(--c-ink);
}
.company__list {
  margin-top: 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.company__list li {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 12px;
  font-size: clamp(16px, 1.5vw, 21px);
  line-height: 1.6;
  letter-spacing: .08em;
  color: var(--c-ink);
}
.company__list .icon { width: 26px; height: 26px; color: var(--c-orange); }
.company__list a:hover { color: var(--c-blue); text-decoration: underline; }

.qr { display: flex; flex-direction: column; gap: 48px; padding-top: 22px; }
.qr img { width: 154px; height: 154px; }

.site-footer__note {
  grid-column: 1 / -1;
  margin-top: -6px;
  font-size: 16px;
  line-height: 1.95;
  letter-spacing: .06em;
  text-align: center;
  color: var(--c-ink-faint);
}

/* ============================================================
   「準備中」トースト
   ============================================================ */
.toast {
  position: fixed;
  left: 50%; bottom: 28px;
  z-index: 60;
  transform: translate(-50%, 12px);
  max-width: min(520px, calc(100vw - 32px));
  padding: 13px 20px;
  background: rgba(35, 49, 59, .95);
  color: #fff;
  border-radius: var(--r-pill);
  font-size: 14px; line-height: 1.6; text-align: center;
  box-shadow: 0 10px 30px rgba(35, 49, 59, .28);
  opacity: 0;
  transition: opacity .22s ease, transform .22s ease;
}
.toast[data-visible="true"] { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
   タブレット（1024px 以下）
   ============================================================ */
@media (max-width: 1024px) {
  :root { --gutter: 20px; }

  /* ヘッダーはハンバーガー式に切り替え */
  .site-header {
    position: sticky; top: 0;
    padding-block: var(--sp-3);
    background: #fff;
    border-bottom: 1px solid var(--c-line-soft);
  }
  .site-header__inner {
    grid-template-columns: auto auto;
    justify-content: space-between;
    align-items: center;
    column-gap: var(--sp-4);
  }
  .site-header__logo img { width: 104px; }

  .nav-toggle {
    display: inline-flex; align-items: center; gap: var(--sp-2);
    padding: 8px 10px;
    background: none; border: 1px solid var(--c-line-soft); border-radius: var(--r-sm);
    cursor: pointer;
  }
  .nav-toggle__bars { display: grid; gap: 4px; width: 20px; }
  .nav-toggle__bars span {
    display: block; height: 2px; background: var(--c-ink); border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .nav-toggle__label { font-size: 12px; font-weight: 700; letter-spacing: .06em; }

  .global-nav {
    display: block;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--c-line-soft);
    box-shadow: 0 2px 10px rgba(35, 49, 59, .06);
    padding: var(--sp-4) var(--gutter) var(--sp-5);
  }
  .global-nav[hidden] { display: none; }

  .global-nav__list { padding-top: 0; gap: 0; align-items: stretch; }
  .global-nav__list a {
    display: block;
    padding: 13px 2px;
    border-bottom: 1px solid var(--c-line-soft);
    font-size: 15px;
  }
  .global-nav__list a:hover { border-bottom-color: var(--c-line-soft); }

  .global-nav__actions {
    margin-top: var(--sp-5);
    padding-top: 0;
    justify-self: stretch;
    justify-content: space-between;
  }
  .global-nav__actions .btn { min-height: 44px; font-size: 15px; }
  .lang-switch__menu { right: 0; left: auto; }

  .section-title__ja { margin-top: var(--sp-2); }

  /* フッター：ロゴ＋リンク／QR の上段と、標語・会社情報の下段 */
  .site-footer { padding-block: var(--sp-7) 96px; }
  .site-footer__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: var(--sp-6);
  }
  .site-footer__brand { padding-right: 0; }
  .site-footer__logo { width: 150px; }
  .footer-nav { padding-top: 40px; }
  .site-footer__info { grid-column: 1 / -1; grid-row: 2; }
  .qr { flex-direction: row; gap: var(--sp-4); padding-top: 0; }
  .qr img { width: 112px; height: 112px; }

  /* お問い合わせタブは下部固定のピルに。フッターの内容と重ならないよう余白を足してある。 */
  .contact-tab,
  .contact-tab--right {
    left: auto; right: var(--sp-4); top: auto; bottom: var(--sp-4);
    padding: 12px 22px;
    border-radius: var(--r-pill);
  }
  .contact-tab__text { writing-mode: horizontal-tb; font-size: 15px; letter-spacing: .08em; }
}

/* ============================================================
   スマートフォン（767px 以下）
   ============================================================ */
@media (max-width: 767px) {
  :root { --gutter: 16px; }

  body { font-size: 15px; }

  .site-footer__inner { grid-template-columns: 1fr; }
  .site-footer__brand { grid-template-columns: 1fr; row-gap: var(--sp-4); }
  .footer-nav { padding-top: 0; }
  .footer-nav ul { flex-direction: row; flex-wrap: wrap; gap: 4px 20px; }
  .footer-nav a, .footer-nav button { font-size: 15px; letter-spacing: .08em; }
  .site-footer__info { grid-row: auto; }
  .site-footer__tagline { font-size: 20px; letter-spacing: .06em; }
  .site-footer__slogan { font-size: 18px; padding-left: 0; }
  .qr img { width: 96px; height: 96px; }
  .site-footer__note { text-align: left; font-size: 13px; }

  .toast { bottom: 84px; }
}

/* 最小幅 320px でも破綻しないための微調整 */
@media (max-width: 359px) {
  /* ラベルは見た目だけ隠す。display: none にするとボタンの読み上げ名が無くなる
     （バーは aria-hidden のため）。.visually-hidden と同じ指定で、名前「メニュー」を残す。 */
  .nav-toggle__label {
    position: absolute; width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0;
    clip-path: inset(50%); overflow: hidden; white-space: nowrap;
  }
  .site-header__logo img { width: 92px; }
  .contact-tab { padding-inline: 16px; }
}
