/* ============================================================
   shell.css — 全9ページ共通の外殻
   ------------------------------------------------------------
   デザイントークン / ベース / ヘッダー / ボタン / フッター。
   トップ(index.html)も下層8ページも同じヘッダー・フッターを出すため、
   ここ1か所で持つ。**home.css と styles.css に複製しないこと**
   （二重管理して片方だけ直す事故を避ける）。
   読み込み順は shell.css → home.css / styles.css。
   後から読むファイル側で上書きできる。
   ============================================================ */

:root {
  --hm-dark: #061a35;          /* ヘッダー */
  --hm-dark-hero: #041d40;     /* Final CTA */
  --hm-dark-footer: #02132c;   /* フッター */
  --hm-white: #ffffff;
  --hm-soft: #f7f9fc;          /* 支援内容セクション背景 */
  --hm-text: #0f1729;
  --hm-text-2: #4d5a70;
  --hm-text-3: #6b7689;
  --hm-on-dark: #ffffff;
  --hm-on-dark-2: #b7c4d8;
  --hm-on-dark-3: #93a3ba;

  /* 参考画像実測のオレンジ (#fe6005)。白18px boldで3.2:1 を確保する */
  --hm-orange: #f95c00;
  --hm-orange-deep: #e14f00;
  --hm-orange-soft: #fff1e8;
  /* 白背景の上の文字・リンク用（白に対し 5.0:1）。面のオレンジは文字には使わない */
  --hm-orange-ink: #c2410c;

  /* サイト全体のダーク面は紺で統一する（ヒーローの写真と地続きに見せるため）。
     純黒に戻すとヒーロー/特長バンドだけ浮くので、個別に黒を書かないこと。 */
  /* ヒーローと特長バンドの紺（参考画像 06-hero-blue.png の実測） */
  --hm-navy-deep: #01163e;   /* ヒーロー背景（写真の紺と揃える） */
  --hm-navy-ink: #0b1526;    /* 淡い面の上の見出し文字 */

  --hm-border: #e6e9ef;
  --hm-border-2: #dbe0e9;
  --hm-border-dark: rgba(255, 255, 255, 0.1);

  --hm-container: 1584px;      /* 1672 - 44*2 */
  --hm-narrow: 1456px;         /* 支援内容の列幅 (1672 - 108*2) */
  --hm-header-h: 100px;
  /* 特長バンドの確定高。ヒーロー高の計算で差し引くので、値を変えたら両方を再実測する */
  --hm-facts-h: clamp(96px, 6.9vw, 130px);

  --hm-font: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Yu Gothic Medium", sans-serif;
  --hm-latin: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
  --hm-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ============================================================ base */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hm-header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--hm-white);
  color: var(--hm-text);
  font-family: var(--hm-font);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; }
img { display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.4; font-weight: 700; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--hm-orange);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 2000;
  padding: 10px 18px;
  background: var(--hm-text);
  color: #fff;
  border-radius: 8px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

.hm-container {
  width: min(var(--hm-container), calc(100% - 88px));
  margin-inline: auto;
}
.hm-container--narrow {
  width: min(var(--hm-narrow), calc(100% - 88px));
  margin-inline: auto;
}

/* セクション見出し（中央・34px） */
.hm-h2 {
  font-size: clamp(28px, 2.65vw, 44px);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  color: var(--hm-text);
}

/* ============================================================ buttons */

.hm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: transform 0.16s var(--hm-ease), box-shadow 0.16s var(--hm-ease),
              background-color 0.16s var(--hm-ease), border-color 0.16s var(--hm-ease);
}
.hm-btn:hover { transform: translateY(-2px); }

.hm-btn--primary {
  background: var(--hm-orange);
  color: #fff;
}
.hm-btn--primary:hover {
  background: var(--hm-orange-deep);
  box-shadow: 0 10px 26px rgba(249, 92, 0, 0.28);
}

/* ヒーローの主ボタンだけピル型（参考デザイン 06 に準拠） */
.hm-btn--pill {
  background: var(--hm-orange);
  color: #fff;
  border-radius: 999px;
}
.hm-btn--pill:hover {
  background: var(--hm-orange-deep);
  box-shadow: 0 10px 26px rgba(249, 92, 0, 0.3);
}
.hm-btn__chev { flex: none; width: 1.15em; height: 1.15em; display: block; }

/* 白地に置く枠線ボタン */
.hm-btn--outline {
  background: #fff;
  border: 1.5px solid var(--hm-orange);
  color: var(--hm-orange-deep);
}
.hm-btn--outline:hover { background: var(--hm-orange-soft); }

/* ダーク地に置く枠線ボタン */
.hm-btn--ghostdark {
  background: transparent;
  border: 1.5px solid var(--hm-orange);
  color: #fff;
}
.hm-btn--ghostdark:hover { background: rgba(249, 92, 0, 0.14); }

/* ボタン内の丸矢印（参考画像の白丸+オレンジ矢印） */
.hm-btn__disc {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--hm-orange);
  transition: transform 0.16s var(--hm-ease);
}
.hm-btn__disc svg { width: 18px; height: 18px; display: block; }
.hm-btn:hover .hm-btn__disc { transform: translateX(3px); }
.hm-btn__ico { flex: none; display: grid; place-items: center; }
.hm-btn__ico svg { width: 32px; height: 32px; display: block; }

/* ============================================================ header */

.hm-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--hm-dark);
  transition: box-shadow 0.25s ease;
}
.hm-header.is-scrolled { box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45); }

.hm-header__inner {
  width: min(var(--hm-container), calc(100% - 80px));
  margin-inline: auto;
  min-height: var(--hm-header-h);
  display: flex;
  align-items: center;
  gap: 28px;
}

.hm-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: #fff;
  flex: none;
}
.hm-brand__mark {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #ff7a1a, var(--hm-orange));
}
.hm-brand__mark svg { width: 27px; height: 27px; display: block; }
.hm-brand__name {
  display: block;
  font-family: var(--hm-latin);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  white-space: nowrap;
}
.hm-brand__tag {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.08em;
  line-height: 1.4;
  white-space: nowrap;
}

.hm-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 26px;
}
.hm-nav__list {
  display: flex;
  align-items: center;
  gap: 8px;
  /* CTA 側へ寄せる。margin-right: auto にするとブランド直後へ固定され、
     ナビ末尾と CTA の間に参考の4倍以上の空白が空く */
  margin-left: auto;
  margin-right: clamp(24px, 3vw, 56px);
}
.hm-nav__list a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.hm-nav__list a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

.hm-nav__actions { flex: none; }
.hm-nav__actions .hm-btn {
  min-height: 53px;
  padding: 0 26px;
  font-size: 15.5px;
  border-radius: 9px;
  gap: 10px;
}
.hm-nav__actions .hm-btn svg { width: 19px; height: 19px; }

.hm-navtoggle {
  display: none;
  position: relative;
  width: 46px;
  height: 46px;
  flex: none;
  margin-left: auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.hm-navtoggle span {
  position: absolute;
  left: 50%;
  /* ボタンの中心から積む。top を px で固定すると、SP でボタンが
     46px → 42px に縮んだときに3本線だけ下へ寄る（実測で3pxずれていた） */
  top: 50%;
  width: 20px;
  height: 2px;
  margin-left: -10px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.hm-navtoggle span:nth-child(1) { transform: translateY(-7px); }
.hm-navtoggle span:nth-child(2) { transform: translateY(-1px); }
.hm-navtoggle span:nth-child(3) { transform: translateY(5px); }
.hm-navtoggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(-1px) rotate(45deg); }
.hm-navtoggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hm-navtoggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-1px) rotate(-45deg); }

.hm-navscrim {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(4, 7, 10, 0.55);
  opacity: 0;
  visibility: hidden;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.hm-navscrim.is-open { opacity: 1; visibility: visible; }

/* ============================================================ footer */

.hm-footer {
  background: var(--hm-dark-footer);
  color: var(--hm-on-dark-2);
}
.hm-footer a { transition: color 0.15s ease; }
.hm-footer a:hover { color: #fff; }

.hm-footer__inner {
  width: min(var(--hm-container), calc(100% - 88px));
  margin-inline: auto;
  padding-top: clamp(44px, 4vw, 64px);
}

.hm-footer__top {
  display: grid;
  grid-template-columns: minmax(280px, 360px) repeat(3, minmax(0, 1fr)) minmax(280px, 340px);
  gap: clamp(28px, 3.2vw, 56px);
  align-items: start;
}
.hm-footer__brandcol .hm-brand { margin-bottom: 22px; }
.hm-footer__desc {
  font-size: 13.5px;
  line-height: 2.0;
  color: var(--hm-on-dark-3);
}
.hm-footer__col-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 22px;
}
.hm-footer__list { display: grid; gap: 15px; }
.hm-footer__list a { font-size: 17px; color: var(--hm-on-dark-2); }

.hm-footer__contact {
  border: 1.5px solid var(--hm-orange);
  border-radius: 12px;
  padding: 26px 30px;
}
.hm-footer__contact-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.7;
  margin-bottom: 18px;
}
.hm-footer__contact .hm-btn {
  width: 100%;
  min-height: 54px;
  font-size: 16px;
  border-radius: 9px;
  gap: 10px;
}
.hm-footer__contact .hm-btn svg { width: 20px; height: 20px; }

/* 法的注記（非公式・商標・出典） */
.hm-footer__legal {
  margin-top: clamp(36px, 3.4vw, 56px);
  display: grid;
  gap: 10px;
}
.hm-footer__note {
  font-size: 12.5px;
  line-height: 1.95;
  color: var(--hm-on-dark-3);
  max-width: 1100px;
}
.hm-footer__note a { color: #c3c7cd; text-decoration: underline; }

.hm-footer__bottom {
  margin-top: clamp(22px, 2.2vw, 34px);
  border-top: 1px solid var(--hm-border-dark);
  padding-block: 26px;
  /* 参考ではリンク群が右端フラッシュではなく「サービス」列の位置から始まる */
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  align-items: center;
  gap: 12px clamp(28px, 3.2vw, 56px);
  font-size: 13px;
  color: #8593ab;
}
.hm-footer__bottom-links { display: flex; flex-wrap: wrap; gap: 12px clamp(28px, 3.6vw, 64px); justify-self: start; }
.hm-footer__bottom a { color: #a3b1c6; }

/* ============================================================ responsive */

@media (max-width: 1280px) {
  :root { --hm-header-h: 84px; }
  .hm-header__inner, .hm-footer__inner { width: calc(100% - 56px); }
  .hm-nav__list { margin-left: auto; margin-right: 16px; gap: 0; }
  /* 中間3列が狭すぎると「部門別ユースケー／ス」のように語中で折り返す */
  .hm-footer__top { grid-template-columns: minmax(220px, 300px) repeat(3, minmax(0, 1fr)) minmax(250px, 300px); }
  .hm-nav__list a { font-size: 13.5px; padding: 8px 9px; }
  .hm-nav__actions .hm-btn { min-height: 46px; padding: 0 18px; font-size: 14px; }
  .hm-brand__name { font-size: 18px; }
  .hm-brand__mark { width: 40px; height: 40px; border-radius: 9px; }
}

@media (max-width: 1180px) {
  .hm-footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-footer__contact { grid-column: 1 / -1; max-width: 460px; }
}

/* ナビはこの幅からハンバーガー（日本語6項目+CTAは収まらない） */
@media (max-width: 1024px) {
  .hm-navtoggle { display: block; }
  .hm-nav {
    position: fixed;
    top: var(--hm-header-h);
    left: 0;
    right: 0;
    z-index: 950;
    display: block;
    max-height: calc(100dvh - var(--hm-header-h));
    overflow-y: auto;
    padding: 14px 24px 26px;
    background: #07162b;
    border-bottom: 1px solid var(--hm-border-dark);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  }
  .hm-nav.is-open { visibility: visible; opacity: 1; transform: none; }
  .hm-nav__list { display: grid; gap: 2px; margin: 0; }
  .hm-nav__list a { display: block; padding: 13px 12px; font-size: 15px; }
  .hm-nav__actions { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--hm-border-dark); }
  .hm-nav__actions .hm-btn { width: 100%; min-height: 52px; font-size: 15.5px; }
}

@media (max-width: 767px) {
  :root { --hm-header-h: 68px; }
  .hm-header__inner { width: calc(100% - 40px); gap: 14px; }
  .hm-footer__inner { width: calc(100% - 40px); }
  .hm-brand__mark { width: 36px; height: 36px; }
  .hm-brand__name { font-size: 16px; }
  .hm-brand__tag { font-size: 10px; }
  .hm-navtoggle { width: 42px; height: 42px; }

  .hm-footer__top { grid-template-columns: 1fr; gap: 28px; }
  .hm-footer__contact { max-width: none; }
  .hm-footer__bottom { grid-template-columns: 1fr; align-items: flex-start; }
  /* SP のタップ領域確保（リンク行を約40pxに） */
  .hm-footer__list { gap: 2px; }
  .hm-footer__list a { display: inline-block; padding: 10px 0; }
  .hm-footer__bottom-links { flex-wrap: wrap; gap: 0 28px; }
  .hm-footer__bottom a { display: inline-block; padding: 10px 0; }
}

@media (max-width: 400px) {
  .hm-header__inner, .hm-footer__inner { width: calc(100% - 32px); }
}

/* ============================================================ reduced motion */

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

/* ============================================================ print */

@media print {
  .hm-header, .hm-navscrim { display: none !important; }
}
