/* ゆるウェル 共通の見た目（色・文字・上部メニュー・フッター・見出し・ボタン・動き）
   各ページは、このファイルのあとに、そのページだけの部品を <style> で足す。
   2つの案内ページ（ai-guide・security-guide）で共有する分かれ道の図の部品は assets/guide.css。 */

/* ---------- 色 ---------- */
:root {
  --ink: #171d1f;
  --ink-soft: #4c5659;
  --ink-faint: #667073;
  --bg: #ffffff;
  --bg-raised: #fafbfb;
  --border: #dfe4e5;
  --teal: #147d94;
  --teal-strong: #0e6478;
  --leaf: #3f9457;
  --leaf-text: #2c7442;
  --mono: var(--teal);
  --grid-line: rgba(20, 125, 148, 0.05);
  /* 図の色（案内ページ） */
  --band-bg: #123a44;
  --band-fg: #ffffff;
  --band-sub: #b9d8df;
  --rail: #7b898c;
  --dest-bg: #eef6f0;
  --end-bg: #f0f3f3;
  /* 濃い面（トップの最初の画面・お問い合わせの帯）。2026-10-09 HP化の試作で追加 */
  --hero-bg: #0f3b44;
  --hero-fg: #ffffff;
  --hero-sub: #b9d8df;      /* 濃い面の補足の文字 8.07:1 */
  --hero-accent: #9fd8aa;   /* 濃い面の緑の小さな文字 7.45:1 */
  --hero-link: #a8e3f0;     /* 濃い面のリンク 8.62:1 */
  --hero-line: rgba(185, 216, 223, 0.22);
  /* お問い合わせの丸いボタン（ロゴの緑に寄せた明るい緑） */
  --cta-bg: #9fd49c;
  --cta-bg-hover: #b6e2b3;
  --cta-ink: #0d2416;       /* 9.66:1 */
  --cta-edge: #2c7442;      /* 白地の上でもボタンの形が分かる縁 5.70:1 */
  --header-bg: color-mix(in srgb, var(--bg) 86%, transparent);
  --shadow: 0 14px 34px -18px rgba(15, 59, 68, 0.45);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eef2f2;
    --ink-soft: #a9b4b5;
    --ink-faint: #848f8d;
    --bg: #0d1213;
    --bg-raised: #131a1b;
    --border: #263030;
    --teal: #5fc4dc;
    --teal-strong: #86d6ea;
    --leaf: #74c98a;
    --leaf-text: #74c98a;
    --mono: var(--teal);
    --grid-line: rgba(95, 196, 220, 0.07);
    --band-bg: #17313a;
    --band-fg: #eef2f2;
    --band-sub: #9fc6cf;
    --rail: #6f7f82;
    --dest-bg: #13251a;
    --end-bg: #171f20;
    --hero-bg: #0c2a30;
    --hero-fg: #eef2f2;
    --hero-sub: #9fc6cf;
    --hero-accent: #9fd8aa;
    --hero-link: #a8e3f0;
    --hero-line: rgba(159, 198, 207, 0.2);
    --cta-bg: #9fd49c;
    --cta-bg-hover: #b6e2b3;
    --cta-ink: #0d2416;
    --cta-edge: #9fd49c;
    --shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.8);
  }
}
:root[data-theme="dark"] {
  --ink: #eef2f2;
  --ink-soft: #a9b4b5;
  --ink-faint: #848f8d;
  --bg: #0d1213;
  --bg-raised: #131a1b;
  --border: #263030;
  --teal: #5fc4dc;
  --teal-strong: #86d6ea;
  --leaf: #74c98a;
  --leaf-text: #74c98a;
  --mono: var(--teal);
  --grid-line: rgba(95, 196, 220, 0.07);
  --band-bg: #17313a;
  --band-fg: #eef2f2;
  --band-sub: #9fc6cf;
  --rail: #6f7f82;
  --dest-bg: #13251a;
  --end-bg: #171f20;
  --hero-bg: #0c2a30;
  --hero-fg: #eef2f2;
  --hero-sub: #9fc6cf;
  --hero-accent: #9fd8aa;
  --hero-link: #a8e3f0;
  --hero-line: rgba(159, 198, 207, 0.2);
  --cta-bg: #9fd49c;
  --cta-bg-hover: #b6e2b3;
  --cta-ink: #0d2416;
  --cta-edge: #9fd49c;
  --shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.8);
}

/* ---------- 土台 ---------- */
:root {
  --gutter: 24px;
  --header-h: 72px;
  --font-sans: "Noto Sans JP", "Hiragino Sans", sans-serif;
  --font-head: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}
@media (max-width: 900px) { :root { --header-h: 60px; } }
@media (max-width: 480px) { :root { --gutter: 16px; } }

* { box-sizing: border-box; }
html {
  /* ページ内リンクやキーボードのフォーカスで移った先が、固定メニューの下に隠れないようにする */
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
html, body { margin: 0; }
body {
  position: relative;
  background:
    radial-gradient(circle at 1px 1px, var(--grid-line) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--bg);
  background-attachment: fixed, fixed;
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.8;
  font-size: 15.5px;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-head); color: var(--ink); text-wrap: balance; letter-spacing: 0.01em; }
/* 見出しは文節で折り返す（word-break: auto-phrase は lang="ja" の対応ブラウザだけで効き、非対応ブラウザは今までどおりの折り返しになる）。
   1つの文節が1行に収まらないときだけ、文節の途中で折り返して横にはみ出さないようにする */
h1, h2, h3 { word-break: auto-phrase; overflow-wrap: anywhere; }
.mono { font-family: var(--font-mono); }
.wrap { width: min(calc(100% - 2 * var(--gutter)), var(--wrap-max, 980px)); margin-inline: auto; }
a { color: var(--teal); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* JavaScriptが動くときだけ、固定メニューの分だけ本文を下げる（動かないときはメニューが本文の上に普通に並ぶ） */
.js body:not(.has-hero) main { padding-top: var(--header-h); }

/* 本文へ移動（キーボードで最初にたどる所） */
.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--bg); color: var(--ink); border: 2px solid var(--teal);
  padding: 8px 14px; border-radius: 6px; font-size: 0.9rem; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- 上部メニュー ---------- */
.site-header {
  position: relative; z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.js .site-header {
  position: fixed; inset: 0 0 auto 0;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease);
}
.site-header__inner {
  width: min(calc(100% - 2 * var(--gutter)), 1200px);
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
/* ロゴは文字が濃い色のため、どの背景の上でも読めるよう白い札に載せる */
.site-logo {
  display: inline-flex; align-items: center; flex: none;
  background: #ffffff; border-radius: 8px; padding: 3px 8px;
  box-shadow: 0 1px 0 rgba(15, 59, 68, 0.08);
}
.site-logo img { display: block; height: 40px; width: auto; }
@media (max-width: 900px) { .site-logo img { height: 34px; } }

.site-nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 32px); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(10px, 2.2vw, 30px); }
.site-nav ul a {
  position: relative;
  display: inline-flex; flex-direction: column; align-items: center; gap: 0;
  min-height: 44px; justify-content: center; padding-inline: 2px;
  color: var(--ink); text-decoration: none;
}
.site-nav .en { font-family: var(--font-mono); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.14em; line-height: 1.4; }
.site-nav .ja { font-size: 0.69rem; color: var(--ink-soft); line-height: 1.4; letter-spacing: 0.04em; }
.site-nav ul a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--leaf));
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.site-nav ul a:hover::after, .site-nav ul a:focus-visible::after, .site-nav ul a.is-current::after, .site-nav ul a[aria-current]::after { transform: scaleX(1); }

/* 丸いボタン（CONTACT 等） */
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 8px 22px;
  border-radius: 999px; border: 1.5px solid var(--cta-edge);
  background: var(--cta-bg); color: var(--cta-ink);
  font-family: var(--font-mono); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.12em;
  text-decoration: none;
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.pill .arrow { display: inline-block; transition: transform 0.25s var(--ease); }
.pill:hover, .pill:focus-visible { background: var(--cta-bg-hover); transform: translateY(-2px); box-shadow: var(--shadow); }
.pill:hover .arrow, .pill:focus-visible .arrow { transform: translateX(4px); }
.pill:focus-visible { outline-offset: 4px; }

/* 狭い画面のメニューの開け閉め（JavaScriptが動くときだけ出る） */
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .site-header__inner { flex-wrap: wrap; }
  /* JavaScriptが無いとき：メニューは開いたまま、折り返して並ぶ */
  .site-nav { flex-wrap: wrap; width: 100%; padding-bottom: 12px; }
  .site-nav ul { flex-wrap: wrap; }
  .js .site-header__inner { flex-wrap: nowrap; }
  .js .menu-toggle {
    display: inline-flex; align-items: center; gap: 10px;
    min-height: 44px; padding: 6px 14px;
    background: transparent; color: var(--ink);
    border: 1.5px solid currentColor; border-radius: 999px;
    font-family: var(--font-mono); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.14em;
    cursor: pointer;
  }
  .menu-toggle .bars { position: relative; width: 16px; height: 10px; }
  .menu-toggle .bars::before, .menu-toggle .bars::after {
    content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 1px;
    transition: transform 0.25s var(--ease), top 0.25s var(--ease);
  }
  .menu-toggle .bars::before { top: 0; }
  .menu-toggle .bars::after { top: 8px; }
  .menu-toggle[aria-expanded="true"] .bars::before { top: 4px; transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .bars::after { top: 4px; transform: rotate(-45deg); }

  .js .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 16px;
    padding: 8px var(--gutter) 24px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .js .site-nav:not(.is-open) { display: none; }
  .js .site-nav ul { flex-direction: column; gap: 0; }
  .js .site-nav ul a {
    flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 14px;
    width: 100%; min-height: 52px; border-bottom: 1px solid var(--border);
  }
  .js .site-nav ul a::after { bottom: -1px; }
  .js .site-nav .en { font-size: 0.95rem; }
  .js .site-nav .ja { font-size: 0.8rem; }
  .js .site-nav .pill { align-self: flex-start; }
}

/* トップの最初の画面の上：背景を透かし、文字を白くする。スクロールしたら白っぽい半透明に戻す */
.js .has-hero .site-header:not(.is-solid) {
  background: transparent; border-bottom-color: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.js .has-hero .site-header:not(.is-solid) .site-nav ul a,
.js .has-hero .site-header:not(.is-solid) .menu-toggle { color: var(--hero-fg); }
.js .has-hero .site-header:not(.is-solid) .site-nav .ja { color: var(--hero-sub); }
.js .has-hero .site-header:not(.is-solid) a:focus-visible,
.js .has-hero .site-header:not(.is-solid) button:focus-visible { outline-color: var(--hero-link); }
@media (max-width: 900px) {
  /* 狭い画面で開いたメニューの中は、常に白っぽい面 */
  .js .has-hero .site-header:not(.is-solid) .site-nav ul a { color: var(--ink); }
  .js .has-hero .site-header:not(.is-solid) .site-nav .ja { color: var(--ink-soft); }
}

/* 狭い画面でメニューを開いている間は、上の帯も開いた面と同じ色にする（濃い面が透けて灰色に見えないように） */
.js .site-header.menu-open { background: var(--bg); }

/* 読んだ位置を示す細い線（メニューの下端） */
.progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--teal), var(--leaf));
  transform: scaleX(var(--progress, 0)); transform-origin: left;
  pointer-events: none;
}

/* ---------- 見出し（大きな英字＋小さな日本語） ---------- */
.sec-title { margin: 0 0 clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: 4px; line-height: 1; }
.sec-title .ja {
  order: 0;
  font-family: var(--font-sans); font-size: 0.88rem; font-weight: 700; letter-spacing: 0.08em;
  color: var(--teal); line-height: 1.6;
}
.sec-title .ja::before { content: "／"; content: "／" / ""; margin-right: 0.2em; }
.sec-title .ja::after { content: "／"; content: "／" / ""; margin-left: 0.2em; }
.sec-title .en {
  order: 1;
  font-family: var(--font-head); font-weight: 900;
  font-size: clamp(2.6rem, 8vw, 5.2rem); letter-spacing: 0.02em; line-height: 1.05;
  color: var(--ink);
}
.on-dark .sec-title .ja { color: var(--hero-accent); }
.on-dark .sec-title .en { color: var(--hero-fg); }

/* ---------- フッター ----------
   案内ページの末尾の但し書き（.footer-notes）は、本文と同じ幅（.wrap）にそろえる */
.site-footer {
  margin-top: 0;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-raised) 88%, transparent);
  color: var(--ink-faint);
  font-size: 0.8rem;
}
.footer-notes { padding-block: 26px 0; display: flex; flex-direction: column; gap: 6px; }
.footer-notes p { margin: 0; max-width: 64em; }
.footer-main {
  display: grid; grid-template-columns: auto 1fr; gap: 24px 48px; align-items: start;
  padding-block: 32px;
}
.footer-main .site-logo { justify-self: start; }
.footer-main .site-logo img { height: 48px; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px 40px; }
.footer-nav div { min-width: 0; }
.footer-nav .head { margin: 0 0 6px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; color: var(--ink-faint); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.footer-nav a {
  display: inline-flex; align-items: center; min-height: 32px;
  color: var(--ink-soft); text-decoration: none; font-size: 0.86rem;
  border-bottom: 1px solid transparent;
}
.footer-nav a:hover, .footer-nav a:focus-visible { color: var(--teal); }
.footer-nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.footer-nav a:hover span, .footer-nav a:focus-visible span { text-decoration: underline; text-underline-offset: 3px; }
.copyright { margin: 0; padding-block: 0 36px; font-family: var(--font-mono); }
.wrap.wide { --wrap-max: 1200px; }
@media (max-width: 700px) {
  .footer-main { grid-template-columns: 1fr; }
  .footer-nav { justify-content: flex-start; }
}

/* ---------- 動き（スクロールで順に現れる） ----------
   .motion は、site.js が「動きを減らす設定ではない」ことを確かめてから付ける。
   JavaScriptが無い・動きを減らす設定のときは、何も隠さない */
.motion [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.motion [data-reveal="left"] { transform: translateX(-32px); }
.motion [data-reveal="right"] { transform: translateX(32px); }
.motion [data-reveal="zoom"] { transform: scale(0.94); }
.motion [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
@media print {
  .site-header, .skip-link { position: static !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
