/* =========================================================
   Shannon LLC — shared stylesheet
   ========================================================= */

:root {
  /* ===== 色 =====================================================
     ここに無い色を CSS に直接書かない。増やすときはここに足す。 */
  --bg: #ffffff;          /* 基本の背景 */
  --bg-alt: #fafafa;      /* 薄いグレーの帯 */
  --bg-muted: #f5f6f8;    /* さらに沈めた面（デモ画面の枠など） */
  --ink: #111318;         /* 本文・見出し */
  --ink-2: #1a1d23;       /* 本文（やや淡い） */
  --ink-3: #2e323a;       /* 補足 */
  --muted: #555a63;       /* 注記 */
  --muted-2: #6b7280;     /* いちばん淡い注記 */
  --on-accent: #ffffff;   /* 色やグラデーションの上に載せる文字 */
  --line: #e7e8ec;
  --line-2: #eff0f3;      /* さらに薄い区切り */
  --line-strong: #d9dbe3; /* 入力欄など、はっきり見せたい枠 */
  --cyan: #00D4E4;
  --blue: #5B6CFF;
  --magenta: #FF3D9A;
  --accent: #5B6CFF;      /* 単色アクセント。ホバー・フォーカス・選択状態 */
  --accent-ink: #3d48d6;  /* アクセントの文字色（背景が白のとき） */
  --accent-soft: #eef0ff; /* アクセントの薄い面 */
  --danger: #d54158;      /* エラー */
  --grad: linear-gradient(90deg, #00D4E4 0%, #5B6CFF 50%, #FF3D9A 100%);
  --grad-soft: linear-gradient(90deg, rgba(0,212,228,.12) 0%, rgba(91,108,255,.12) 50%, rgba(255,61,154,.12) 100%);

  /* ===== 文字 ===================================================
     大きさ・太さ・字間は、この段階だけを使う。
     和文向けの値（国内 SaaS の実測に合わせる）: 本文 16px・行間 1.85・
     字間はマイナスにしない。見出しは 700、本文は 400。 */
  --font-ui: 'Inter', 'Noto Sans JP', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-jp: 'Noto Sans JP', 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-display: var(--font-ui);   /* 英語の見出しも UI フォントで組む */

  --fs-2xs: 12px;    /* バッジ・ごく小さいラベル */
  --fs-xs: 13px;     /* 補助ラベル・日付 */
  --fs-sm: 14px;   /* 注記・カードの本文 */
  --fs-base: 16px;   /* 本文 */
  --fs-md: 18px;     /* 大きめの本文・リード */
  --fs-h3: 22px;
  --fs-lg: 20px;
  --fs-xl: 28px;
  --fs-h2: clamp(26px, 3.2vw, 38px);
  --fs-h1: clamp(30px, 3.6vw, 46px);

  --fw-normal: 400;  /* 本文 */
  --fw-medium: 500;  /* 本文の中で少し立てる */
  --fw-bold: 600;    /* 見出し・ボタン・強調 */
  --fw-heavy: 700;   /* ロゴ・数字・いちばん強い見出し */

  --ls-tight: 0;  /* 大きい見出し */
  --ls-snug: .01em;   /* 見出し */
  --ls-normal: .02em;
  --ls-wide: .04em;    /* 小さい英字ラベル */
  --ls-wider: .1em;    /* eyebrow・字間を開ける英字 */

  --lh-tight: 1.45;
  --lh-body: 1.85;

  /* ===== 余白・形 ===============================================
     部品の padding / gap は --space だけを使う（4px 基準）。 */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --card-pad: clamp(20px, 2.4vw, 28px);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(17,19,24,.04), 0 1px 1px rgba(17,19,24,.02);
  --shadow: 0 4px 24px rgba(17,19,24,.06);
  --shadow-lg: 0 24px 60px -20px rgba(17,19,24,.18);

  --max: 1200px;
  --pad: clamp(20px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* 日本語は文節の切れ目（ビルド時に scripts/jp-wrap.mjs が入れる <wbr>）と空白・句読点でだけ折り返す。
   iPhone の Safari が単語の途中で改行するのを防ぐ。収まらない長い語だけは例外で折り返す */
html:lang(ja) body { word-break: keep-all; overflow-wrap: anywhere; }

body {
  margin: 0;
  font-family: var(--font-jp);
  font-size: var(--fs-base);
  font-weight: var(--fw-normal);
  letter-spacing: var(--ls-normal);
  color: var(--ink-2);
  background: var(--bg);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "palt" 1;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }

::selection { background: rgba(255, 61, 154, .18); }

/* ----------------- Layout ----------------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ----------------- Sections ----------------- */
.section {
  padding: clamp(72px, 10vw, 128px) 0;
  position: relative;
}
.section--tight { padding: clamp(56px, 8vw, 96px) 0; }
.section--alt { background: var(--bg-alt); }

/* ===================================================================
   CONTACT CTA (full-width dark band)
   Renders as a full-viewport band even when nested in a .container.
   =================================================================== */
.contact-cta {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: clamp(56px, 9vw, 96px) clamp(24px, 6vw, 80px);
  background:
    radial-gradient(60% 120% at 15% 0%, rgba(0,212,228,.22), transparent 60%),
    radial-gradient(50% 100% at 100% 100%, rgba(255,61,154,.18), transparent 55%),
    linear-gradient(135deg, #0E1230 0%, #181A3A 55%, #1E1438 100%);
  color: var(--on-accent);
  overflow: hidden;
  isolation: isolate;
}
.contact-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px;
  mask-image: radial-gradient(80% 100% at 50% 50%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(80% 100% at 50% 50%, #000 30%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}
.contact-cta__inner {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.contact-cta__inner--single {
  grid-template-columns: 1fr;
  max-width: 720px;
  text-align: center;
}
.contact-cta__inner--single > div { display: flex; flex-direction: column; align-items: center; }
.contact-cta__inner--single p { margin-inline: auto; }
.contact-cta__inner--single .contact-cta__btns { justify-content: center; }
.contact-cta h2 {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.25;
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-snug);
  margin: 0 0 16px;
  color: var(--on-accent);
  text-wrap: balance;
}
.contact-cta p {
  font-size: var(--fs-base);
  line-height: 1.8;
  color: rgba(255,255,255,.7);
  margin: 0 0 28px;
  max-width: 540px;
}
.contact-cta__btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
/* スマホでは相談帯のボタンを横幅いっぱいに揃える（製品サイトと同じ） */
@media (max-width: 640px) {
  .contact-cta__btns { flex-direction: column; width: 100%; }
  .contact-cta__btns .btn { width: 100%; }
}
.contact-cta__side .k {
  font-family: var(--font-ui);
  font-size: var(--fs-2xs);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  margin-bottom: 6px;
}
.contact-cta__side .v {
  font-size: var(--fs-base);
  color: var(--on-accent);
  font-weight: var(--fw-medium);
  word-break: break-all;
}
@media (max-width: 820px) {
  .contact-cta__inner { grid-template-columns: 1fr; }
}

/* The CTA always sits inside a .container — neutralize the horizontal pad
   so the band reaches edge-to-edge. */
.section--tight > .container:has(> .contact-cta:only-child) {
  padding-left: 0;
  padding-right: 0;
  max-width: none;
}
/* When the section wraps only the CTA band, drop the section's vertical
   padding so the dark band sits flush against neighboring blocks (the
   band's own padding handles its breathing room). */
.section--tight:has(> .container > .contact-cta:only-child) {
  padding-top: 0;
  padding-bottom: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--space-4);
}
/* 節の見出し（eyebrow → 見出し → リード）は左揃えで統一する。
   中央に寄せるのは閉じの相談バンド（.contact-cta__inner--single）だけ。 */
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--ink-2);
  display: inline-block;
}
.eyebrow--grad::before {
  background: var(--grad);
  height: 2px;
}

.section-title {
  font-family: var(--font-jp);
  font-weight: var(--fw-heavy);
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  margin: 0 0 var(--space-5);
  color: var(--ink);
  text-wrap: balance;
}
.section-lead {
  color: var(--muted);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  max-width: 720px;
  margin: 0 0 var(--space-8);
  text-wrap: pretty;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ----------------- Header (flat at top → floating pill on scroll) ----------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0;
  pointer-events: none;
  transition: top .3s ease, padding .3s ease;
}
.site-header .container {
  pointer-events: auto;
  max-width: none;
  margin: 0;
  background: rgba(255,255,255,.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border: 1px solid transparent;
  border-bottom: 1px solid rgba(17,19,24,.05);
  border-radius: 0;
  box-shadow: none;
  padding: 0 32px;
  transition:
    max-width .35s cubic-bezier(.4,0,.2,1),
    margin .35s cubic-bezier(.4,0,.2,1),
    padding .35s cubic-bezier(.4,0,.2,1),
    border-radius .35s cubic-bezier(.4,0,.2,1),
    background .25s ease,
    box-shadow .35s ease,
    border-color .35s ease;
}
/* On scroll, collapse into floating pill */
.site-header.is-scrolled {
  top: 16px;
  padding: 0 20px;
}
.site-header.is-scrolled .container {
  max-width: 1160px;
  margin: 0 auto;
  background: rgba(255,255,255,.9);
  border-color: rgba(17,19,24,.06);
  border-bottom-color: rgba(17,19,24,.06);
  border-radius: 999px;
  padding: 0 8px 0 24px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.7) inset,
    0 14px 32px -14px rgba(17,19,24,.2),
    0 4px 12px -6px rgba(17,19,24,.1);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 112px;
  gap: 24px;
}
@media (max-width: 720px) {
  .nav { height: 72px; gap: 12px; }
  .brand__mark { height: 60px; }
  /* Disable the floating pill on mobile — keep the header flat
     and full-width whether scrolled or not. */
  .site-header.is-scrolled { top: 0; padding: 0; }
  .site-header.is-scrolled .container {
    max-width: none;
    margin: 0;
    border-radius: 0;
    padding: 0 16px;
    box-shadow: none;
    background: rgba(255,255,255,.92);
  }
  .site-header .container { padding: 0 16px; }
}
/* Make the left (brand) and right (cta) columns symmetrical
   so the centered nav stays visually centered. */
.nav > .brand,
.nav > .nav__cta {
  flex: 1 1 0;
  min-width: 0;
}
.nav > .brand { justify-content: flex-start; }
.nav > .nav__cta { justify-content: flex-end; display: flex; padding-right: 48px; }
.nav > nav {
  flex: 0 1 auto;
  display: flex;
  justify-content: center;
}
.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: var(--font-ui);
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
  padding: 2px 6px;
}
.brand__mark {
  /* Transparent PNG of the official logo (wordmark included). 3:2 aspect.
     Lines are now thicker / higher contrast, so it can sit at a moderate height
     and still read clearly. */
  width: auto;
  height: 96px;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
}
/* Footer logo: prominent brand mark. */
.site-footer .brand__mark { height: 220px; }
@media (max-width: 720px) { .site-footer .brand__mark { height: 150px; } }

.nav__links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0; padding: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  white-space: nowrap;
}
.nav__item { position: relative; }
.nav__link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--ink);
  font-family: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  line-height: 1.1;
  transition: color .15s ease, background .15s ease;
  position: relative;
}
.nav__link-en {
  font-size: var(--fs-base);
  font-weight: var(--fw-heavy);
  letter-spacing: var(--ls-snug);
}
.nav__link-ja {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  color: var(--muted);
  letter-spacing: var(--ls-wide);
  transition: color .15s ease;
}
.nav__chev {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  opacity: .5;
  transition: transform .2s ease, opacity .15s ease;
}
.nav__item--has-sub .nav__link { padding-right: 22px; }

/* Right-to-left underline sweep on hover */
.nav__link::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--grad);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform .4s cubic-bezier(.4, 0, .2, 1);
  pointer-events: none;
}
.nav__item--has-sub .nav__link::before { right: 22px; }
.nav__link:hover::before,
.nav__link:focus-visible::before,
.nav__item.is-open > .nav__link::before {
  transform: scaleX(1);
  transform-origin: left center; /* sweep: enters right→left, exits left→right */
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--ink);
  outline: none;
}
.nav__link:hover .nav__link-ja { color: var(--ink-3); }
.nav__item.is-open > .nav__link,
.nav__item.is-open > .nav__link .nav__chev { opacity: 1; }
.nav__item.is-open .nav__chev { transform: translateY(-50%) rotate(180deg); }

.nav__item.is-active > .nav__link::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--grad);
  border-radius: 2px;
  opacity: .35;
}
.nav__item--has-sub.is-active > .nav__link::after { right: 22px; }

/* ----- Dropdown submenu ----- */
.nav-sub {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 6px);
  min-width: 280px;
  padding-top: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 60;
}
.nav__item.is-open > .nav-sub {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.nav-sub__inner {
  background: var(--bg);
  border: 1px solid rgba(17,19,24,.08);
  border-radius: 14px;
  padding: 8px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 20px 40px -20px rgba(17,19,24,.25),
    0 8px 16px -8px rgba(17,19,24,.12);
  display: grid;
  gap: 2px;
}
.nav-sub--grid .nav-sub__inner {
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  padding: 12px;
}
.nav-sub--grid .nav-sub__item {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 2px;
  padding: 10px 12px;
}
.nav-sub--grid .nav-sub__label {
  font-size: var(--fs-sm);
}
.nav-sub--grid .nav-sub__ja {
  font-size: var(--fs-2xs);
}
.nav-sub--grid .nav-sub__desc {
  display: none;
}
.nav-sub__item {
  display: grid;
  grid-template-columns: auto auto 1fr;
  white-space: nowrap;
  align-items: baseline;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--ink);
  transition: background .15s ease;
}
.nav-sub__item:hover { background: var(--bg-alt); }
.nav-sub__item.is-active { background: rgba(91,108,255,.06); }
.nav-sub__label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-heavy);
  letter-spacing: var(--ls-snug);
  color: var(--ink);
}
.nav-sub__ja {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--ink-3);
}
.nav-sub__desc {
  grid-column: 1 / -1;
  font-size: var(--fs-2xs);
  color: var(--muted);
  line-height: 1.5;
  margin-top: 2px;
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* 言語切替リンク（JA ⇄ EN） */
.nav__lang {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  color: var(--ink-3);
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  transition: color .2s, border-color .2s;
}
.nav__lang:hover { color: var(--ink); border-color: var(--ink-3); }

.menu-btn {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: 8px;
}
.menu-btn:hover { background: var(--bg-muted); }
.menu-btn span {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--ink);
  position: relative;
}
.menu-btn span::before,
.menu-btn span::after {
  content: ""; position: absolute; left: 0;
  width: 18px; height: 1.5px;
  background: var(--ink);
}
.menu-btn span::before { top: -6px; }
.menu-btn span::after  { top:  6px; }


/* ----------------- 幅と揃えのユーティリティ -----------------
   節の見出し（.eyebrow / .section-title / .section-lead）は左揃えで統一する。
   中央に寄せるのは、閉じの相談バンド（.contact-cta__inner--single）だけ。
   マークアップに style="max-width:…" や style="text-align:center" を書かない。 */
.container--tight { max-width: 720px; }
.container--narrow { max-width: 760px; }
.container--mid { max-width: 920px; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ----------------- Buttons -----------------
   .btn ＋ 見た目（--primary / --ghost / --invert / --ghost-invert）＋ 大きさ（--sm / --lg）。
   フォームの送信ボタン（.wpcf7-submit）はマークアップに class を足せないので、
   ここのセレクタに相乗りさせる。ボタンの定義をよそに書き写さない。 */
.btn,
.wpcf7-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn--primary,
.wpcf7-submit {
  color: var(--on-accent);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .12);
  background: var(--grad);
  background-size: 180% 100%;
  background-position: 30% 50%;
  box-shadow: 0 8px 24px -8px rgba(255, 61, 154, .35), 0 4px 10px -4px rgba(91, 108, 255, .25);
}
.btn--primary:hover,
.wpcf7-submit:hover { background-position: 100% 50%; transform: translateY(-1px); }
.btn--ghost {
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--bg);
}
.btn--ghost:hover {
  border-color: rgba(17,19,24,.18);
  background: var(--bg-alt, #f7f7f8);
}
.btn--sm { height: 38px; padding: 0 16px; font-size: var(--fs-sm); }
.btn--lg,
.wpcf7-submit { height: 56px; padding: 0 28px; font-size: var(--fs-base); }

/* ----------------- Legal documents (privacy / security / ai-policy) ----------------- */
.legal-doc {
  font-size: var(--fs-base);
  line-height: 1.95;
  color: var(--ink-2);
}
.legal-doc > p,
.legal-doc > ul,
.legal-doc > ol {
  margin: 0 0 18px;
}
.legal-doc h2 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  color: var(--ink);
  margin: 36px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.legal-doc ul,
.legal-doc ol {
  padding-left: 1.4em;
}
.legal-doc li {
  margin-bottom: 6px;
}
.legal-doc__meta {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--ink-3);
  text-align: right;
}

/* 矢印付きのテキストリンク（「一覧を見る」など）。サイト内で 1 つだけ。
   下線は付けず、ホバーで矢印が右にずれる。
   カード全体がリンクのときは、中にこれを置かない（二重に見える）。 */
.tlink {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  line-height: 1.4;
  color: var(--ink);
  text-decoration: none;
  transition: gap .2s ease, color .2s ease;
}
.tlink svg { width: 14px; height: 14px; flex: none; }
.tlink:hover { gap: var(--space-3); color: var(--accent-ink); }

/* ----------------- Generic card ----------------- */
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #dadce2;
}

/* ----------------- Footer ----------------- */
.site-footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--line);
  background: var(--bg-alt, var(--bg-muted));
  color: var(--ink-3);
  font-family: var(--font-ui);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 40px 32px;
  padding-bottom: 56px;
}
/* ロゴ＋紹介文は全幅の上段に。リンク6列に幅を確保して折り返しを防ぐ */
.footer-intro {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 28px;
  padding-bottom: 8px;
}
.footer-col h4 {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
}
.footer-col ul {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  gap: 10px;
  font-size: var(--fs-sm);
}
.footer-col a:hover { color: var(--ink); }
.footer-intro p {
  font-size: var(--fs-sm);
  color: var(--muted);
  max-width: 420px;
  line-height: 1.8;
  margin: 0;
}
.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: var(--fs-xs);
  color: var(--muted);
  flex-wrap: wrap;
}
.footer-legal { display: flex; gap: 20px; flex-wrap: wrap; }

/* ----------------- Floating mobile CTA ----------------- */
.float-cta {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: none;
  box-shadow: 0 14px 32px -8px rgba(255, 61, 154, .45);
}

/* ----------------- Responsive ----------------- */
@media (max-width: 1100px) {
  .nav__links { display: none; }
  .menu-btn { display: inline-flex; }
  .nav > .nav__cta { padding-right: 8px; }
}
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .float-cta { display: inline-flex; }
  /* モバイルヘッダーは言語切替だけ残す。Contact CTA は float CTA と
     ドロワー内に集約しているため、ヘッダーからは外して横幅を確保する。 */
  .nav > .nav__cta { flex: 0 0 auto; }
  .nav__cta .btn { display: none; }
  /* ロゴはモバイルで左寄せ（縦積みの中央寄せを解除）。 */
  .nav > .brand { align-items: flex-start; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-intro { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer-col ul { padding-left: 12px; }
}

/* ----------------- Mobile drawer ----------------- */
.drawer {
  position: fixed;
  inset: 0;
  background: rgba(17,19,24,.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 60;
}
.drawer.is-open { opacity: 1; pointer-events: auto; }
.drawer__panel {
  position: absolute;
  top: 0; right: 0;
  height: 100%;
  width: min(360px, 90vw);
  background: var(--bg);
  padding: 16px 24px 24px;
  transform: translateX(100%);
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__close {
  align-self: flex-end;
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--fs-lg);
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  margin-bottom: 8px;
}
.drawer__nav {
  flex: 1 1 auto;
  font-family: var(--font-ui);
}
.drawer__section {
  padding: 14px 0;
}
.drawer__section:first-of-type { padding-top: 4px; }
.drawer__heading {
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  color: var(--ink);
  margin: 0 0 8px;
}
.drawer__heading a {
  color: inherit;
  text-decoration: none;
}
.drawer__sub {
  list-style: none;
  padding: 0 0 0 12px;
  margin: 0;
}
.drawer__sub a {
  display: block;
  padding: 9px 0;
  font-size: var(--fs-sm);
  color: var(--ink-2);
  text-decoration: none;
}
.drawer__top {
  list-style: none;
  padding: 14px 0 0;
  margin: 0;
}
.drawer__top a {
  display: block;
  padding: 12px 0;
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  color: var(--ink);
  text-decoration: none;
}
.drawer__cta {
  flex: 0 0 auto;
  padding-top: 20px;
  margin-top: 20px;
}
.drawer__cta .btn { width: 100%; }

/* Hide the floating bottom-right CTA on mobile (drawer covers that need) */
@media (max-width: 720px) {
  .float-cta { display: none !important; }
}

/* External link anchors (footer / drawer): keep the trailing arrow icon
   on the same line as the label. flex layout guarantees the label and
   icon stay siblings on a single row regardless of label length. */
a.link-ext {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
a.link-ext > svg {
  flex-shrink: 0;
  opacity: .5;
  transition: opacity .15s ease, transform .15s ease;
}
a.link-ext:hover > svg {
  opacity: 1;
  transform: translate(1px, -1px);
}
/* 別窓アイコン（外部リンク）。文字色に従う */
/* アイコン（中身は src/icons.ts が唯一の定義。svg に width/height は書かず、大きさはここで決める） */
.arrow, .ext-icon { display: inline-block; flex: none; width: 14px; height: 14px; }
.arrow { width: 20px; height: 10px; }
.btn--lg .ext-icon { width: 15px; height: 15px; }
.btn--sm .ext-icon { width: 13px; height: 13px; }
.ext-icon { vertical-align: -1px; margin-left: 6px; opacity: .75; }
.btn .ext-icon, .tlink .ext-icon { margin-left: 0; opacity: 1; }
.nav-sub__label .ext-icon { width: 12px; height: 12px; }

/* Non-link list items in the footer / drawer (used for upcoming products
   that don't have an LP yet) render in muted color so they read as
   placeholders rather than missing links. */
.footer-col ul li:not(:has(> a)) { color: var(--muted); }
.drawer__sub li:not(:has(> a)) {
  padding: 9px 0;
  font-size: var(--fs-sm);
  color: var(--muted);
}

/* Secondary h4 within the same footer column gets a top gap so stacked
   sections (Cases/News, Company/Recruit/Contact) breathe. */

/* ===================================================================
   現行コンテンツ向けの追加（2026-09 角丸・グラデーション路線へ復帰）
   =================================================================== */
/* 暗い背景（Contact バンド・ダークな製品コンテナ）用のボタン */
.btn--invert {
  color: var(--ink);
  font-weight: var(--fw-bold);
  background: var(--bg);
  box-shadow: 0 10px 24px -10px rgba(0,0,0,.4);
}
.btn--invert:hover { transform: translateY(-1px); background: var(--bg); }
.btn--ghost-invert {
  color: var(--on-accent);
  border: 1px solid rgba(255,255,255,.5);
  background: transparent;
}
.btn--ghost-invert:hover { border-color: var(--bg); background: rgba(255,255,255,.08); }

/* 英語ディスプレイ見出し（"Our Services" 等）。太字 Inter＋任意の細字キッカー */
.display-title {
  font-family: var(--font-ui);
  font-weight: var(--fw-heavy);
  font-size: clamp(30px, 4.2vw, 48px);
  line-height: 1.12;
  letter-spacing: -.025em;
  color: var(--ink);
  margin: 0;
}
.display-title__kicker {
  font-weight: var(--fw-normal);
  color: var(--muted);
  margin-right: .28em;
}

/* 矢印の動き（.grow）と下線スイープ（.ul）。現行ページのリンクが使う */

/* モーダル（役員経歴）表示中のスクロールロック */
html.menu-open { overflow: hidden; }

.footer-col a { transition: color .15s ease; }
.footer-legal a:hover { color: var(--ink); }

/* ----------------- 簡易お問い合わせ（右下の吹き出し窓口 / ChatWidget.astro） -----------------
   ランチャー（丸ピル）＋その上に開くパネル。デザインは既存トークンのまま
   （角丸 22px / 丸ピル / --grad の主 CTA / --accent のフォーカス）。
   z-index はドロワー(60)より上、ただしドロワー表示中は隠す。 */
.chat {
  position: fixed;
  right: 32px;
  bottom: 32px;
  z-index: 61;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  font-family: var(--font-jp);
}
html.menu-open .chat { display: none; }


.chat-launcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  color: var(--on-accent);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .12);
  background: var(--grad);
  background-size: 180% 100%;
  box-shadow: 0 18px 40px -10px rgba(91, 108, 255, .55), 0 2px 8px rgba(17, 19, 24, .12);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background-position .4s ease;
}
.chat-launcher:hover { transform: translateY(-2px); background-position: 100% 0; }
.chat-launcher.is-tucked { opacity: 0; transform: translateY(16px); pointer-events: none; }
.chat-launcher { transition: transform .15s ease, box-shadow .2s ease, background-position .4s ease, opacity .25s ease; }
.chat-launcher:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.chat-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(380px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 140px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--bg);
  box-shadow: var(--shadow-lg);
  animation: chat-panel-in .22s ease both;
}
@keyframes chat-panel-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.chat-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-2);
}
.chat-panel__title { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.chat-panel__title strong { font-family: var(--font-ui); font-size: var(--fs-base); font-weight: var(--fw-bold); color: var(--ink); }
.chat-panel__title span { font-size: var(--fs-xs); line-height: 1.6; color: var(--muted-2); }
.chat-panel__close {
  display: inline-flex;
  padding: 6px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.chat-panel__close:hover { color: var(--ink); background: var(--bg-muted); }

.chat-log {
  flex: 1 1 auto;
  min-height: 120px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 14px 14px 14px 4px;
  background: var(--bg-muted);
  font-size: var(--fs-sm);
  line-height: 1.8;
  color: var(--ink-2);
  animation: chat-msg-in .2s ease both;
}
.chat-msg--user {
  align-self: flex-end;
  border-radius: 14px 14px 4px 14px;
  background: var(--accent);
  color: var(--on-accent);
}
@keyframes chat-msg-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.chat-foot {
  position: relative;
  flex: 0 0 auto;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--line-2);
  background: var(--bg-alt);
}
.chat-step { display: flex; flex-direction: column; gap: 8px; }
/* display を指定したので、hidden 属性が効くように明示的に戻す */
.chat-panel[hidden], .chat-step[hidden] { display: none; }
.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: flex-start;
  max-width: 100%;
  animation: chat-msg-in .2s ease both;
}
.chat-chip {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-size: var(--fs-sm);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, transform .15s ease;
}
.chat-chip:hover { border-color: var(--accent); color: var(--accent-ink); transform: translateY(-1px); }
.chat-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 「次へ」「送信する」の直上に出る「ひとつ前に戻る」。主張させず、取り消しの逃げ道に留める */
.chat-back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  padding: 4px 2px;
  border: 0;
  background: none;
  font-family: var(--font-jp);
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: var(--muted-2);
  cursor: pointer;
}
.chat-back:hover { color: var(--accent-ink); text-decoration: underline; }
.chat-back:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }

.chat-input {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  font-family: var(--font-jp);
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: var(--ink-2);
}
.chat-input::placeholder { color: var(--muted-2); }
.chat-input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.chat-input--area { resize: vertical; min-height: 76px; }

.chat-consent { display: flex; gap: 8px; font-size: var(--fs-xs); line-height: 1.7; color: var(--muted); }
.chat-consent input { margin-top: 4px; accent-color: var(--accent); }
.chat-consent a { text-decoration: underline; }

.chat-send { width: 100%; margin-top: 2px; }
.chat-send[disabled] { opacity: .6; cursor: default; }
.chat-done { margin: 0; font-size: var(--fs-xs); line-height: 1.8; color: var(--muted); }
.chat-done a { color: var(--accent-ink); text-decoration: underline; }
.chat-error {
  margin: 10px 0 0;
  font-size: var(--fs-xs);
  line-height: 1.7;
  color: #D9264F;
}

@media (max-width: 1080px) {
  /* 右下はこの窓口に一本化する（LP の .float-cta とは並べない） */
  .float-cta { display: none !important; }
}
@media (max-width: 640px) {
  .chat { right: 16px; bottom: 16px; }
  .chat-launcher { height: 44px; padding: 0 18px; }
  .chat-panel { max-height: min(560px, calc(100vh - 110px)); }
}
@media (prefers-reduced-motion: reduce) {
  .chat-panel, .chat-msg, .chat-chips { animation: none; }
  .chat-launcher:hover, .chat-chip:hover { transform: none; }
}

/* ----------------- 余白のユーティリティ -----------------
   マークアップに style 属性を書かない。値は --space の段階だけ。 */
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mb-4 { margin-bottom: var(--space-4); }
.pb-7 { padding-bottom: var(--space-7); }
.m0 { margin: 0; }

/* ----------------- フォームの結果表示 ----------------- */
.form-alert-slot { display: none; margin: var(--space-4) 0; }
.form-alert-slot.is-on { display: block; }
.form-alert {
  border: 1.5px solid var(--ink);
  padding: var(--space-4) var(--space-5);
  font-weight: var(--fw-heavy);
}
.form-alert--error { border-color: var(--danger); color: var(--danger); }

/* ----------------- 記事の見出し周り ----------------- */
.article-meta { margin: 0 0 var(--space-2); }
.article-meta .tag { margin-left: var(--space-2); }
.article-meta__updated { margin-left: var(--space-3); color: var(--muted); }
/* 記事末尾の「よくある質問」。本文の h2 / h3 / p の見た目をそのまま使い、上に区切りだけ足す */
.insight-faq { margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--line); }
.bullets { margin: 0; padding-left: 1.2em; }
.lead-sm { font-size: var(--fs-sm); color: var(--ink-3); margin: 0; }

/* 出し分けの棚で、先頭の件数より後ろのもの（nudge.js が付け外しする） */
[data-pz-shelf] > .pz-rest { display: none; }
