/* site.css — 全ページ共通（トークン＋共通部品）
   読み込み順: site.css → assets/css/pages/{lp,legal}.css（ページ固有）
   ここで定義するもの:
     1. トークン（:root）… 書体・文字サイズ・行間・字間・角丸・色・サイト幅
     2. ベース … box-sizing / body の書体 / 見出しの書体
     3. 部品 … .skip-link / .site-header（.nav .brand .nav-links .nav-toggle .nav-contact .nav-cta-mobile）
               / .button(.primary .secondary .amber) / .footer
   ページ本文の幅は各ページ CSS の --max（LP 820px・legal 920px・トップ 1120px）。
   ヘッダー・フッターの幅は --site-max（トップの --max と同値）を使い、--max には触れない。 */

/* ============ 1. トークン ============ */
:root {
  /* 書体 */
  --font-heading: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-body: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;

  /* 文字サイズ（8段階） */
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-base: 15px;
  --fs-md: 17px;
  --fs-lg: 20px;
  --fs-xl: 24px;
  --fs-2xl: clamp(28px, 3.2vw, 36px);
  --fs-3xl: clamp(34px, 4.6vw, 52px);

  /* 行間・字間 */
  --lh-tight: 1.25;
  --lh-normal: 1.6;
  --lh-loose: 1.85;
  --ls-tight: -0.01em;
  --ls-normal: 0;
  --ls-wide: 0.06em;

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

  /* 色（ネイビー #002850 系・アンバー・ティール。lp.css / legal.css / トップの既存値） */
  --ink: #172333;
  --navy: #002850;
  --navy-soft: #0a3b5f;
  --muted: #5c6875;
  --line: #d9e2e7;
  --paper: #fbfcf8;
  --white: #ffffff;
  --teal: #0f8a86;
  --teal-dark: #0a6461;
  --amber: #e6a93b;
  --soft-teal: #eef7f5;
  --warm: #f4f0e4;
  --shadow: 0 18px 40px rgba(23, 33, 43, .11);

  /* 幅 */
  --site-max: 1120px;
}

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

html { scroll-padding-top: 80px; }

body {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
}

/* ============ 3. 部品 ============ */

/* スキップリンク（フォーカス時だけ見える） */
.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--navy);
  color: var(--white);
  font-size: var(--fs-base);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: none;
  color: var(--white);
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

/* --- ヘッダー（トップ index.html と同じ見た目・挙動。980px 以下はハンバーガー） --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 252, 248, .94);
  border-bottom: 1px solid rgba(217, 226, 231, .8);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.site-header .nav {
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  font-family: var(--font-body);
  line-height: var(--lh-normal);
}

.site-header a { text-decoration: none; }

.brand,
.brand:hover {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: var(--ls-normal);
  text-decoration: none;
}

.brand-logo {
  width: 56px;
  height: 30px;
  display: block;
  object-fit: contain;
  object-position: center;
}

.brand-copy {
  display: grid;
  gap: 1px;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: var(--fs-base);
  font-weight: 600;
}

.brand-copy small {
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--navy-soft);
  font-size: var(--fs-sm);
  font-weight: 500;
}

.nav-links > a:not(.button) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--navy-soft);
  white-space: nowrap;
}

.nav-links > a:not(.button):hover { color: var(--teal-dark); }

.button.nav-cta-mobile { display: none; }

.nav-toggle,
.nav-contact { display: none; }

.nav-toggle {
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .22s ease, opacity .18s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (prefers-reduced-motion: reduce) {
  .nav-toggle-bar { transition: none; }
}

/* --- ボタン --- */
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  padding: 10px 18px;
  font-family: inherit;
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(23, 33, 43, .12);
}

.button.primary,
.button.primary:hover { color: var(--white); }
.button.primary { background: var(--navy); }
.button.primary:hover { background: var(--navy-soft); }

.button.secondary,
.button.secondary:hover {
  color: var(--ink);
  background: var(--white);
  border-color: var(--line);
}

.button.amber,
.button.amber:hover {
  color: var(--ink);
  background: var(--amber);
  border-color: var(--amber);
}

.button:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

/* --- フッター --- */
.footer {
  padding: 48px 24px 0;
  background: var(--navy);
  color: rgba(255, 255, 255, .74);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
}

.footer-inner {
  max-width: var(--site-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col-title {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, .58);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

.footer-brand,
.footer-brand:hover {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: rgba(255, 255, 255, .92);
  font-size: var(--fs-base);
  font-weight: 600;
  text-decoration: none;
}

.footer-brand img {
  width: 48px;
  height: 26px;
  object-fit: contain;
  padding: 2px 4px;
  border-radius: var(--r-sm);
  background: var(--white);
}

.footer-tagline {
  margin: 0;
  color: rgba(255, 255, 255, .7);
  line-height: var(--lh-normal);
}

.footer-address {
  margin: 4px 0 0;
  font-style: normal;
  color: rgba(255, 255, 255, .7);
  line-height: var(--lh-normal);
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
  line-height: var(--lh-normal);
}

.footer-list li {
  margin: 0;
  color: rgba(255, 255, 255, .74);
}

/* タップ領域 44px を確保 */
.footer-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: rgba(255, 255, 255, .84);
  text-decoration: none;
}

.footer-list a:hover { color: var(--amber); }

.footer a:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

.footer-bottom {
  max-width: var(--site-max);
  margin: 28px auto 0;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, .16);
  color: rgba(255, 255, 255, .7);
  font-size: var(--fs-xs);
}

/* ============ レスポンシブ ============ */
@media (max-width: 980px) {
  .site-header .nav { gap: 10px; }

  .nav-links { display: none; }

  .nav-toggle { display: inline-flex; }

  body.nav-open { overflow: hidden; }

  body.nav-open .nav-links {
    position: fixed;
    top: var(--nav-top, 64px);
    left: 0;
    right: 0;
    z-index: 25;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100vh - var(--nav-top, 64px));
    max-height: calc(100dvh - var(--nav-top, 64px));
    overflow-y: auto;
    padding: 0 0 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 32px rgba(0, 40, 80, .14);
    font-size: 16px;
  }

  body.nav-open .nav-links > a:not(.button) {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 16px;
    border-bottom: 1px solid var(--line);
  }

  body.nav-open .nav-links > a:not(.button):focus-visible,
  body.nav-open .nav-contact a:focus-visible {
    outline: 3px solid var(--amber);
    outline-offset: -3px;
  }

  body.nav-open .nav-links > .button.primary { margin: 16px 16px 0; }

  body.nav-open .nav-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    padding: 12px 16px 0;
    font-size: var(--fs-sm);
  }

  body.nav-open .nav-contact a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    color: var(--navy-soft);
  }

  .button.nav-cta-mobile {
    display: inline-flex;
    padding: 8px 14px;
    font-size: var(--fs-sm);
  }

  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-col-brand { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .site-header .nav { padding-inline: 16px; }

  .brand,
  .brand:hover { min-width: 142px; }

  .brand-logo {
    width: 48px;
    height: 26px;
  }

  .brand-copy small { display: none; }

  .footer { padding-inline: 16px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}
