/* ============================================================
   システム工房 雨樹 ホームページ 共通スタイルシート
   デザイン方針: 無彩色 + アクセントカラー1色（モダン系）
   参考: https://www.asia-quest.jp/service/modernization/application-system/lp
   ビルド工程なし・素のCSSのみ（Sass等未使用）
   ============================================================ */

/* ---------- 1. リセット & 変数 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP",
    "Yu Gothic Medium", "Meiryo", sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure { margin: 0; }
button { font: inherit; }

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f4f5f8;
  --color-bg-dark: #14161f;
  --color-text: #1b1e27;
  --color-text-muted: #5b6270;
  --color-border: #e3e5ec;
  --color-accent: #3452e0;
  --color-accent-dark: #2539a8;
  --color-accent-soft: #ebeefd;
  --font-sans: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 28px;
  --shadow: 0 10px 30px rgba(20, 24, 40, 0.08);
  --shadow-sm: 0 4px 14px rgba(20, 24, 40, 0.06);
  --header-h: 76px;
  --container-w: 1120px;
}

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 88px 0; }
@media (max-width: 640px) {
  section { padding: 56px 0; }
}

.section-alt { position: relative; background: var(--color-bg-alt); overflow: hidden; }
/* セクション境界の波形装飾（前セクションの白背景から滑らかに繋げる） */
.section-alt::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 48px;
  background: url("../svg/wave-divider.svg") top / 100% 100% no-repeat;
  pointer-events: none;
}
/* セクション角のドット柄装飾 */
.section-alt::after {
  content: "";
  position: absolute;
  top: 30px; right: 20px;
  width: 140px;
  height: 140px;
  background-image: radial-gradient(var(--color-border) 1.5px, transparent 1.5px);
  background-size: 15px 15px;
  opacity: 0.7;
  pointer-events: none;
}
.section-alt > .container { position: relative; z-index: 1; }

.section-head {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-head.align-left { margin-left: 0; text-align: left; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

h1 { font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.4; font-weight: 800; letter-spacing: 0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; line-height: 1.5; }
h3 { font-size: 1.2rem; font-weight: 700; }
.lead { font-size: 1.05rem; color: var(--color-text-muted); margin-top: 16px; }

/* ---------- 2. ボタン ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(52, 82, 224, 0.28);
}
.btn-primary:hover, .btn-primary:focus-visible { background: var(--color-accent-dark); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-outline:hover, .btn-outline:focus-visible { border-color: var(--color-accent); color: var(--color-accent); transform: translateY(-2px); }
.btn-block { width: 100%; }

/* ---------- 3. ヘッダー / ナビ ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-h);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0;
}
.brand-name { font-size: 1rem; letter-spacing: 0.02em; }
.brand-name rt {
  font-weight: 500;
  font-size: 0.6em;
  color: var(--color-text-muted);
  letter-spacing: 0;
  user-select: none;
}
.brand-sub { display: block; font-size: 0.68rem; font-weight: 500; color: var(--color-text-muted); letter-spacing: 0.06em; }

.site-nav ul { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: background 0.15s ease, color 0.15s ease;
}
.site-nav a:hover, .site-nav a:focus-visible { background: var(--color-bg-alt); color: var(--color-text); }
.site-nav a.is-current { color: var(--color-accent); background: var(--color-accent-soft); }
.site-nav a.nav-cta {
  background: var(--color-accent);
  color: #fff;
  margin-left: 6px;
}
.site-nav a.nav-cta:hover, .site-nav a.nav-cta.is-current { background: var(--color-accent-dark); color: #fff; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--color-text); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: #fff;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    overflow-y: auto;
  }
  .site-nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 20px; gap: 6px; }
  .site-nav a { padding: 14px 16px; font-size: 1.02rem; }
  .site-nav a.nav-cta { text-align: center; margin-left: 0; margin-top: 8px; }
}

/* ---------- 4. フッター ---------- */
.site-footer { background: var(--color-bg-dark); color: #cbd0dd; padding: 64px 0 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; padding-bottom: 40px; }
.footer-name { color: #fff; font-weight: 800; font-size: 1.1rem; margin-bottom: 10px; }
.footer-desc { max-width: 360px; font-size: 0.9rem; color: #9aa0b1; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.footer-nav a { font-size: 0.9rem; color: #cbd0dd; }
.footer-nav a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 24px;
  font-size: 0.8rem;
  color: #7b8194;
  text-align: center;
}

/* ---------- 5. ヒーロー ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 96px;
  background:
    radial-gradient(1200px 500px at 85% -10%, var(--color-accent-soft), transparent 60%),
    var(--color-bg);
}

/* ヒーロー背景装飾（ブロブ・ドット・斜線パターン） asia-quest.jp的なモダンLPの雰囲気を意識 */
.hero-decor {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.hero-decor-blob { position: absolute; }
.hero-decor-blob-1 { top: -110px; right: -90px; width: 440px; height: 440px; }
.hero-decor-blob-2 { bottom: -140px; left: -110px; width: 340px; height: 340px; }
.hero-decor-dots { position: absolute; left: 4%; bottom: 6%; width: 150px; height: 150px; opacity: 0.55; }
.hero-decor-lines { position: absolute; top: 8%; right: 6%; width: 130px; height: 130px; opacity: 0.3; }
@media (max-width: 900px) {
  .hero-decor-blob-1 { width: 300px; height: 300px; top: -80px; right: -60px; }
  .hero-decor-blob-2 { width: 240px; height: 240px; }
  .hero-decor-lines { display: none; }
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
}
.hero-copy .badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-figure { position: relative; display: flex; justify-content: center; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-figure { order: -1; }
}

/* ---------- 6. カード / グリッド ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  display: grid;
  place-items: center;
  font-weight: 800;
  margin-bottom: 18px;
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--color-text-muted); font-size: 0.94rem; }

.stat-row { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 40px; }
.stat b { display: block; font-size: 1.9rem; color: var(--color-accent); font-weight: 800; }
.stat span { font-size: 0.85rem; color: var(--color-text-muted); }

/* ---------- 7. CTAセクション ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
/* 斜めのラインパターンで単調さを軽減 */
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.1) 0 2px, transparent 2px 42px);
  pointer-events: none;
}
.cta-band::after {
  content: "";
  position: absolute;
  top: -60px; right: 8%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 70%);
  pointer-events: none;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.85); margin-top: 10px; }
.cta-band .btn-outline { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.cta-band .btn-outline:hover { background: #fff; color: var(--color-accent-dark); }
.cta-band .btn-primary { background: #fff; color: var(--color-accent-dark); box-shadow: none; }
.cta-band .btn-primary:hover { background: #eef1ff; }

/* ---------- 8. テーブル ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 480px; }
th, td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--color-border); font-size: 0.94rem; }
th { background: var(--color-bg-alt); color: var(--color-text-muted); font-weight: 700; width: 30%; }
tr:last-child td, tr:last-child th { border-bottom: none; }

/* ---------- 9. パンくず・ページヘッダー ---------- */
.page-header {
  position: relative;
  overflow: hidden;
  padding: 56px 0 40px;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}
/* 下層ページ見出し部の背景装飾（トップページのヒーローと一貫したトーン） */
.page-header::before {
  content: "";
  position: absolute;
  top: -80px; right: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--color-accent-soft), rgba(235, 238, 253, 0) 70%);
  pointer-events: none;
}
.page-header::after {
  content: "";
  position: absolute;
  left: -20px; bottom: -30px;
  width: 130px;
  height: 130px;
  background-image: radial-gradient(var(--color-border) 1.5px, transparent 1.5px);
  background-size: 14px 14px;
  opacity: 0.8;
  pointer-events: none;
}
.page-header > .container { position: relative; z-index: 1; }
.breadcrumb { font-size: 0.82rem; color: var(--color-text-muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-accent); }
.page-header h1 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.page-header .lead { max-width: 640px; }

/* ---------- 10. フォーム ---------- */
.form-grid { display: grid; gap: 20px; }
.form-row { display: flex; flex-direction: column; gap: 8px; }
.form-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .form-row.two-col { grid-template-columns: 1fr; } }
.form-row label { font-weight: 700; font-size: 0.92rem; }
.form-row .required { color: #d64545; font-size: 0.75rem; font-weight: 700; margin-left: 6px; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font-size: 0.96rem;
  font-family: inherit;
  background: #fff;
  color: var(--color-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { min-height: 160px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}
.form-note { font-size: 0.82rem; color: var(--color-text-muted); }
.hp-field { position: absolute; left: -9999px; top: -9999px; }

.alert {
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 28px;
  border: 1px solid var(--color-border);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.alert-success { background: #eefaf0; border-color: #bfe6c8; color: #1c6b34; }

/* ---------- 11. うたくん（マスコット）コンポーネント ---------- */
.matsukun {
  position: relative;
  width: 240px;
  aspect-ratio: 360 / 861;
  margin: 0 auto;
  cursor: pointer;
  user-select: none;
  filter: drop-shadow(0 18px 24px rgba(20, 24, 40, 0.16));
}
.matsukun:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 6px; border-radius: 12px; }
.matsukun .mk-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
}
.matsukun .mk-idle-closed { opacity: 1; }

@keyframes mk-blink {
  0%, 90%, 100% { opacity: 0; }
  92%, 96% { opacity: 1; }
}
.matsukun[data-state="idle"] .mk-blink { animation: mk-blink 4s infinite; }
.matsukun:not([data-state="idle"]) .mk-idle-closed,
.matsukun:not([data-state="idle"]) .mk-blink { opacity: 0; animation: none; }
.matsukun[data-state="explain"] .mk-explain { opacity: 1; }
.matsukun[data-state="worried"] .mk-worried { opacity: 1; }
.matsukun[data-state="cheer"] .mk-cheer { opacity: 1; }

.matsukun.is-lg { width: 300px; }
.matsukun.is-sm { width: 150px; }

.mk-wrap { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 18px; }
.mk-hint { font-size: 0.78rem; color: var(--color-text-muted); }
.mk-bubble {
  position: relative;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  max-width: 260px;
  text-align: center;
}
.mk-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  transform: translateX(-50%) rotate(45deg);
  width: 16px;
  height: 16px;
  background: #fff;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.mk-inline {
  display: flex;
  align-items: center;
  gap: 24px;
}
.mk-inline .matsukun { flex: none; }
@media (max-width: 640px) {
  .mk-inline { flex-direction: column; text-align: center; }
}

/* ---------- 12. 汎用ユーティリティ ---------- */
.text-muted { color: var(--color-text-muted); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.list-check { display: grid; gap: 12px; }
.list-check li { display: flex; gap: 10px; align-items: flex-start; color: var(--color-text-muted); }
.list-check li::before { content: "✓"; color: var(--color-accent); font-weight: 800; flex: none; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 0.8rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--color-bg-alt); border: 1px solid var(--color-border); color: var(--color-text-muted); }

.news-list { display: grid; gap: 0; border-top: 1px solid var(--color-border); }
.news-item {
  display: grid;
  grid-template-columns: 140px auto 1fr;
  gap: 20px;
  align-items: baseline;
  padding: 22px 4px;
  border-bottom: 1px solid var(--color-border);
}
.news-item time { color: var(--color-text-muted); font-size: 0.86rem; }
.news-item .tag { justify-self: start; }
@media (max-width: 640px) {
  .news-item { grid-template-columns: 1fr; gap: 6px; }
}
