/* 合同会社ミィ コーポレートサイト 共通スタイル */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --ink: #12263f;
  --ink-2: #46586d;
  --ink-3: #6b7b8e;
  --line: #d5dee8;
  --line-strong: #b7c4d2;
  /* キーカラー＝ロゴの色 */
  --accent: #9e2d0b;
  --accent-hover: #7f2408;
  --accent-soft: #f7e9e3;
  --navy: #0f2238;
  --navy-2: #1a3452;
  --navy-line: #2f4c6e;
  --on-navy: #e8eef5;
  --on-navy-2: #a9bbcf;
  --todo-bg: #fff07a;
  --todo-ink: #4a3a00;
  --danger: #b3261e;

  --max: 1080px;
  --gutter: 16px;
  --measure: 40em; /* 全角でおよそ40字 */
  --radius: 6px;
  --font: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
}

@media (min-width: 600px) {
  :root { --gutter: 32px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.9;
  font-feature-settings: "palt" 0;
  overflow-wrap: anywhere;
  line-break: strict;
}

img, svg { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: 0.02em;
}

p, ul, ol, dl, table { margin: 0; }

a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: var(--accent-hover); }

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

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.measure { max-width: var(--measure); }

.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
}
.skip-link:focus { top: 8px; color: #fff; }

/* 公開前に埋める箇所 */
.todo {
  background: var(--todo-bg);
  color: var(--todo-ink);
  padding: 0.05em 0.3em;
  border-radius: 2px;
  font-weight: 500;
}

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  min-height: 48px;
  padding: 0.55em 1.5em;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { min-height: 40px; padding: 0.35em 1.1em; font-size: 0.94rem; }

/* ---------- ヘッダー ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.logo:hover { color: var(--ink); }
.logo-mark { display: block; width: auto; height: 34px; }

/* 線のアイコン（/assets/icons.svg） */
.icon {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
  color: var(--accent);
}
.global-nav { margin-left: auto; }
.global-nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  padding: 0;
}
.global-nav a {
  display: block;
  padding: 8px 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius);
}
.global-nav a:hover { background: var(--bg); color: var(--ink); }
.global-nav a[aria-current="page"] { color: var(--accent); }

.header-cta { flex-shrink: 0; }

@media (max-width: 799px) {
  .global-nav { display: none; }
  .header-cta { margin-left: auto; }
  .logo-mark { height: 28px; }
}

/* ---------- セクション共通 ---------- */
.section { padding-block: 72px; }
.section + .section { border-top: 1px solid var(--line); }
.section-white { background: var(--surface); }

@media (min-width: 800px) {
  .section { padding-block: 96px; }
}

.section-head { margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); }
.section-head p { margin-top: 14px; color: var(--ink-2); }

.section-foot { margin-top: 40px; }

.text-link {
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 2px;
}
.text-link::after { content: " →"; }

/* ---------- 下層ページの見出し ---------- */
.page-head {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding-block: 56px 48px;
}
.page-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
.page-head p { margin-top: 16px; color: var(--ink-2); }

/* ---------- ヒーロー ---------- */
.hero {
  background: var(--surface);
  padding-block: 72px 80px;
}
@media (min-width: 800px) {
  .hero { padding-block: 104px 112px; }
}
.hero h1 {
  font-size: clamp(1.5rem, 6.4vw, 3.1rem);
  line-height: 1.4;
  letter-spacing: 0.03em;
}
.hero h1 span { display: inline-block; }
.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 56px; }
  /* 2列のときは見出しが1行12字に収まる大きさにする */
  .hero h1 { font-size: clamp(1.5rem, 3.6vw, 2.7rem); }
}
.hero-art {
  display: block;
  width: 100%;
  max-width: 460px;
  height: auto;
  margin-inline: auto;
}
.hero-lead {
  margin-top: 28px;
  max-width: 36em;
  color: var(--ink-2);
  font-size: 1.06rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

/* ---------- データの流れ図（サイト唯一の見せ場） ---------- */
.flow {
  background-color: var(--navy);
  background-image:
    linear-gradient(var(--navy-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--navy-2) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
  color: var(--on-navy);
  padding-block: 72px 80px;
}
.flow-head h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  color: #fff;
}
.flow-head p {
  margin-top: 10px;
  color: var(--on-navy-2);
  font-size: 0.95rem;
}

.flow-steps {
  --dot: 44px;
  position: relative;
  list-style: none;
  padding: 0;
  margin-top: 48px;
  display: grid;
  gap: 0;
}

.flow-step {
  position: relative;
  padding: 0 0 36px calc(var(--dot) + 20px);
}
.flow-step:last-child { padding-bottom: 0; }

/* 縦の線（スマホ） */
.flow-step::before {
  content: "";
  position: absolute;
  left: calc(var(--dot) / 2 - 1px);
  top: var(--dot);
  bottom: 0;
  width: 2px;
  background: var(--navy-line);
}
.flow-step:last-child::before { display: none; }

/* 線の先の矢印（スマホ） */
.flow-step::after {
  content: "";
  position: absolute;
  left: calc(var(--dot) / 2 - 6px);
  bottom: 6px;
  border: 6px solid transparent;
  border-top: 8px solid var(--on-navy-2);
  border-bottom: 0;
}
.flow-step:last-child::after { display: none; }

.flow-num {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: var(--dot);
  height: var(--dot);
  border-radius: 50%;
  border: 2px solid var(--on-navy-2);
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
}
.flow-num .icon { width: 22px; height: 22px; color: #fff; }
.flow-step:last-child .flow-num {
  background: var(--accent);
  border-color: var(--accent);
}

.flow-step h3 {
  font-size: 1.55rem;
  line-height: var(--dot);
  color: #fff;
  letter-spacing: 0.08em;
}
.flow-step p {
  margin-top: 6px;
  color: var(--on-navy);
  font-size: 0.95rem;
  line-height: 1.8;
}
.flow-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin-top: 10px;
}
.flow-tags li {
  padding: 2px 10px;
  border: 1px solid var(--navy-line);
  border-radius: 999px;
  background: rgba(15, 34, 56, 0.85);
  font-size: 0.86rem;
  color: var(--on-navy);
}

@media (min-width: 900px) {
  .flow-steps {
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
  }
  .flow-step {
    padding: calc(var(--dot) + 22px) 0 0;
  }
  /* 横の線（PC）：丸から次の丸まで */
  .flow-step::before {
    left: var(--dot);
    right: -28px;
    top: calc(var(--dot) / 2 - 1px);
    bottom: auto;
    width: auto;
    height: 2px;
  }
  .flow-step::after {
    left: auto;
    right: -24px;
    top: calc(var(--dot) / 2 - 6px);
    bottom: auto;
    border: 6px solid transparent;
    border-left: 8px solid var(--on-navy-2);
    border-right: 0;
  }
}

/* ---------- 支援内容（左に問い、右に説明） ---------- */
.qa-list { border-bottom: 1px solid var(--line); }
.qa-row {
  display: grid;
  gap: 10px 48px;
  padding-block: 32px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}
@media (min-width: 800px) {
  .qa-row { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}
.qa-q {
  color: var(--ink-2);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.7;
}
.qa-q::before {
  content: "お悩み";
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.qa-a h2, .qa-a h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.22rem;
}
.qa-a h2 .icon, .qa-a h3 .icon { width: 26px; height: 26px; }
.qa-a h3 a { color: var(--ink); text-decoration: none; }
.qa-a h3 a:hover { color: var(--accent); }
.qa-a p { margin-top: 12px; max-width: var(--measure); }
.qa-a .tools {
  margin-top: 16px;
  font-size: 0.92rem;
  color: var(--ink-2);
}
.qa-a .tools b {
  display: inline-block;
  margin-right: 0.8em;
  color: var(--ink);
  font-weight: 700;
}
.qa-a .more { margin-top: 12px; font-size: 0.95rem; }

/* ---------- 進め方の特徴 ---------- */
.approach-grid {
  display: grid;
  gap: 0 48px;
  list-style: none;
  padding: 0;
}
@media (min-width: 800px) {
  .approach-grid { grid-template-columns: 1fr 1fr; }
}
.approach-grid li {
  padding-block: 26px 30px;
  border-top: 2px solid var(--ink);
}
.approach-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--accent-soft);
}
.approach-icon .icon { width: 22px; height: 22px; }
.approach-grid h3 { font-size: 1.15rem; }
.approach-grid p { margin-top: 10px; color: var(--ink-2); }

/* ---------- 支援例 ---------- */
.case-list { display: grid; gap: 28px; }
.case {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 22px;
}
@media (min-width: 800px) {
  .case { padding: 36px 40px; }
}
.case h2, .case h3 { font-size: 1.2rem; }
.case-type {
  display: inline-block;
  margin-bottom: 10px;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 0.85rem;
  font-weight: 700;
}
.case dl { margin-top: 20px; display: grid; gap: 0; }
.case dl > div {
  display: grid;
  gap: 4px 28px;
  padding-block: 14px;
  border-top: 1px solid var(--line);
}
@media (min-width: 800px) {
  .case dl > div { grid-template-columns: 7em minmax(0, 1fr); }
}
.case dt { font-weight: 700; color: var(--ink-2); font-size: 0.94rem; }
.case dd { margin: 0; max-width: var(--measure); }
.case dd ul { margin: 0; padding-left: 1.2em; }
.case dd li + li { margin-top: 6px; }
.case-lead { margin-top: 8px; color: var(--ink-2); }
.case-services {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}
.case-services span { margin-right: 4px; font-weight: 700; color: var(--ink-2); }
.case-services a {
  padding: 2px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
}
.case-services a:hover { border-color: var(--accent); color: var(--accent); }

.case-digest { list-style: none; padding: 0; border-bottom: 1px solid var(--line); }
.case-digest li {
  display: grid;
  gap: 6px 32px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
}
@media (min-width: 800px) {
  .case-digest li { grid-template-columns: 16em minmax(0, 1fr); }
}
.case-digest b { font-weight: 700; }
.case-digest span { color: var(--ink-2); }

/* ---------- よくあるご質問 ---------- */
.faq { border-bottom: 1px solid var(--line); }
.faq > div {
  padding-block: 24px;
  border-top: 1px solid var(--line);
}
.faq dt {
  font-weight: 700;
  font-size: 1.06rem;
}
.faq dd {
  margin: 10px 0 0;
  max-width: var(--measure);
  color: var(--ink-2);
}

/* ---------- 相談への導線 ---------- */
.cta {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-block: 72px;
}
.cta-inner {
  display: grid;
  gap: 24px;
  align-items: center;
}
@media (min-width: 800px) {
  .cta-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 48px; }
}
.cta h2 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); }
.cta p { margin-top: 12px; color: var(--ink-2); max-width: var(--measure); }

/* ---------- 会社概要 ---------- */
.profile {
  display: grid;
  gap: 24px;
  align-items: start;
}
@media (min-width: 640px) {
  .profile { grid-template-columns: 200px minmax(0, 1fr); gap: 36px; }
}
.profile-photo {
  display: block;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 1px solid var(--line);
  object-fit: cover;
  background: var(--bg);
}
@media (min-width: 640px) {
  .profile-photo { width: 200px; height: 200px; }
}
.profile-body { display: grid; gap: 8px; }
.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding: 0;
  list-style: none;
}
.profile-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}
.profile-links a:hover { border-color: var(--accent); color: var(--accent); }
.profile-links .icon { width: 14px; height: 14px; }

/* 画面には出さず、読み上げにだけ伝える文字 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.profile-name { font-size: 1.3rem; font-weight: 700; }
.profile-name small {
  display: block;
  margin-top: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-3);
}
.profile-role { color: var(--ink-2); font-size: 0.95rem; }
.profile p.bio { margin-top: 12px; max-width: var(--measure); }

.info-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.info-table th, .info-table td {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.info-table th {
  width: 8.5em;
  padding-right: 20px;
  font-weight: 700;
  color: var(--ink-2);
  white-space: nowrap;
}
@media (max-width: 599px) {
  .info-table, .info-table tbody, .info-table tr, .info-table th, .info-table td { display: block; width: auto; }
  .info-table th { padding: 14px 0 0; border-bottom: 0; }
  .info-table td { padding: 2px 0 14px; }
}

.about-en {
  margin-top: 48px;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.94rem;
  line-height: 1.75;
}
.about-en h2, .about-en h3 { font-size: 1.05rem; }
.about-en p { margin-top: 10px; max-width: 62ch; }

/* ---------- フォーム ---------- */
.form { display: grid; gap: 26px; max-width: 40rem; }
.field { display: grid; gap: 8px; }
.field label, .field legend { font-weight: 700; }
.req, .opt {
  display: inline-block;
  margin-left: 0.6em;
  padding: 0 7px;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: 0.15em;
}
.req { background: var(--ink); color: #fff; }
.opt { background: var(--line); color: var(--ink-2); }

.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  line-height: 1.6;
}
.field textarea { min-height: 220px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
}
.field-note { color: var(--ink-3); font-size: 0.88rem; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
}
.check input {
  width: 20px;
  height: 20px;
  margin-top: 0.3em;
  accent-color: var(--accent);
  flex-shrink: 0;
}

/* 人には見えない欄（機械だけが入力する） */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  padding: 16px 18px;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  color: var(--ink-2);
  font-size: 0.92rem;
}

/* ---------- 文書ページ（プライバシーポリシー等） ---------- */
.doc { max-width: 46rem; }
.doc h2 {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 1.3rem;
}
.doc h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.doc h3 { margin-top: 32px; font-size: 1.08rem; }
.doc p, .doc ul, .doc ol { margin-top: 12px; }
.doc ul, .doc ol { padding-left: 1.4em; }
.doc li + li { margin-top: 6px; }
.doc dl { margin-top: 12px; }
.doc dl > div { display: grid; gap: 2px 20px; padding-block: 8px; border-bottom: 1px solid var(--line); }
@media (min-width: 600px) {
  .doc dl > div { grid-template-columns: 9em minmax(0, 1fr); }
}
.doc dt { font-weight: 700; color: var(--ink-2); }
.doc dd { margin: 0; }
.doc .doc-date { margin-top: 32px; color: var(--ink-2); }
.doc-lang {
  margin-top: 72px;
  padding-top: 48px;
  border-top: 2px solid var(--ink);
}
.doc-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 18px;
  font-size: 0.95rem;
}

/* ---------- フッター ---------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-block: 48px 32px;
  font-size: 0.92rem;
}
.footer-inner { display: grid; gap: 28px; }
@media (min-width: 800px) {
  .footer-inner { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
}
.footer-brand p { margin-top: 6px; color: var(--ink-2); }
.footer-nav ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, auto));
  gap: 8px 32px;
  list-style: none;
  padding: 0;
}
.footer-nav a { color: var(--ink); text-decoration: none; }
.footer-nav a:hover { color: var(--accent); text-decoration: underline; }
.copyright {
  grid-column: 1 / -1;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.85rem;
}

/* ---------- 単独のお知らせページ（送信完了・404等） ---------- */
.notice { padding-block: 96px 120px; }
.notice h1 { font-size: clamp(1.5rem, 3vw, 2rem); }
.notice p { margin-top: 16px; color: var(--ink-2); max-width: var(--measure); }
.notice .btn { margin-top: 32px; }
