/* =========================================================
   日本総合人事社会保険労務士事務所 — LP
   モノトーン（墨色＋グレー濃淡）／見出し明朝／差し色なし
   ========================================================= */

:root {
  --paper:       #f3f2f0;  /* 紙 */
  --paper-raise: #fbfaf9;
  --white:       #ffffff;

  --ink:   #171615;        /* 深い墨色 */
  --ink-2: #2c2b29;

  --gray-1: #575654;
  --gray-2: #8a8885;
  --gray-3: #b9b7b3;

  --hairline: #d8d6d1;

  --font-serif: "Noto Serif JP", "Yu Mincho", YuMincho,
    "Hiragino Mincho ProN", "Hiragino Mincho Pro", "MS PMincho", serif;

  --wrap: 1120px;
  --measure: 720px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: light;
}
body {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1rem;
  line-height: 2;
  letter-spacing: .02em;
  color: var(--ink);
  background: var(--paper);
  text-align: left;
  text-wrap: pretty; /* 行末の孤立文字を抑制（未対応ブラウザは無視） */
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
h1, h2, h3 { font-weight: 500; line-height: 1.7; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--paper); }

/* ---------- layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}
.wrap--narrow { max-width: var(--measure); }

.section {
  padding-block: clamp(4rem, 11vw, 8.5rem);
  border-top: 1px solid var(--hairline);
}
section[id], .hero[id] { scroll-margin-top: 4.5rem; }

.section__head { margin-bottom: clamp(1.75rem, 4.5vw, 3rem); }
.section__rule {
  display: block;
  width: 2.5rem;
  height: 1px;
  background: var(--ink);
  margin-bottom: 1.25rem;
}
.section__title {
  font-size: clamp(1.4rem, 3vw, 1.95rem);
  letter-spacing: .05em;
  line-height: 1.75;
  text-wrap: pretty;
}

/* ---------- prose ---------- */
.prose > * + * { margin-top: 1.5em; }
.prose p { color: var(--ink-2); text-wrap: pretty; }

/* 行末の孤立文字（「す。」など）を避ける補助 */
.nobr { white-space: nowrap; }
.prose__lead {
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: .04em;
}

/* ---------- buttons / links ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: .95rem;
  letter-spacing: .18em;
  line-height: 1;
  padding: 1.15em 2.6em;
  border: 1px solid var(--ink);
  text-decoration: none;
  transition: background-color .25s ease, color .25s ease;
}
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: transparent; color: var(--ink); }

.link-arrow {
  display: inline-block;
  text-decoration: none;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--gray-3);
  padding-bottom: .15em;
  transition: border-color .25s ease;
}
.link-arrow::after { content: "→"; margin-left: .6em; }
.link-arrow:hover { border-color: var(--ink); }

.link-plain {
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--gray-3);
  transition: text-decoration-color .2s ease;
}
.link-plain:hover { text-decoration-color: var(--ink); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.site-header.is-active { border-bottom-color: var(--hairline); }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}
.site-header__name {
  font-size: clamp(.7rem, 2.4vw, .82rem);
  letter-spacing: .14em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-header__cta {
  flex: none;
  font-size: .74rem;
  letter-spacing: .16em;
  text-decoration: none;
  border: 1px solid var(--ink);
  padding: .7em 1.25em;
  transition: background-color .25s ease, color .25s ease;
}
.site-header__cta:hover { background: var(--ink); color: var(--paper); }

/* ---------- hero（テキストのみ・中央揃え1カラム） ---------- */
.hero { padding-block: clamp(3.5rem, 10vw, 7rem) clamp(4.5rem, 13vw, 9rem); }
.hero__inner { text-align: center; }
.hero__body { max-width: 40rem; margin-inline: auto; }
.hero__rule {
  display: block;
  width: 3rem;
  height: 1px;
  background: var(--ink);
  margin: 0 auto 1.75rem;
}
.hero__name {
  font-size: .8rem;
  letter-spacing: .22em;
  color: var(--gray-1);
  margin-bottom: 2rem;
}
.hero__title {
  font-size: clamp(2rem, 6.2vw, 3.3rem);
  line-height: 1.5;
  letter-spacing: .06em;
}
.hero__lead {
  margin-top: 1.75rem;
  font-size: clamp(1rem, 2.6vw, 1.12rem);
  color: var(--ink-2);
  letter-spacing: .04em;
  text-wrap: pretty;
}
.hero .btn { margin-top: clamp(2.25rem, 5vw, 3rem); }

/* ---------- 額装写真（⑦ 経歴・実績で使用） ---------- */
.portrait {
  background: var(--white);
  padding: clamp(14px, 2.6vw, 22px);
  border: 1px solid var(--hairline);
  box-shadow: 0 30px 60px -42px rgba(0, 0, 0, .38);
}
.portrait__mat { border: 1px solid var(--hairline); }
.portrait img {
  width: 100%;
  height: auto;
  /* 構成書のモノトーン基調に寄せつつ、肌色などをわずかに残す */
  filter: grayscale(72%) contrast(1.02);
}

/* ---------- services ---------- */
.services { display: grid; }
.service {
  padding-block: clamp(1.75rem, 4vw, 2.5rem);
  border-top: 1px solid var(--hairline);
}
.service:first-child { border-top: none; padding-top: 0; }
.service:last-child { padding-bottom: 0; }
.service__name {
  font-size: 1.15rem;
  letter-spacing: .05em;
  margin-bottom: 1em;
}
.service p { color: var(--ink-2); }
.service p + p { margin-top: 1em; }

.service__note {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
  font-size: .95rem;
  color: var(--gray-1);
}
.cta-inline { margin-top: 2.5rem; }

/* ---------- flow ---------- */
.flow { list-style: none; display: grid; padding: 0; }
.flow__step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: baseline;
  padding-block: 1.4rem;
  border-top: 1px solid var(--hairline);
}
.flow__step:first-child { border-top: none; }
.flow__num {
  font-size: 1.05rem;
  letter-spacing: .12em;
  color: var(--gray-2);
}
.flow__label { letter-spacing: .04em; }
.flow__label small {
  display: block;
  margin-top: .35em;
  font-size: .85rem;
  letter-spacing: .02em;
  color: var(--gray-1);
}

@media (min-width: 760px) {
  .flow { grid-template-columns: repeat(4, 1fr); align-items: start; }
  .flow__step {
    grid-template-columns: 1fr;
    align-items: start;
    align-content: start;
    border-top: 1px solid var(--hairline);
    padding: 1.75rem 1.5rem 0 0;
    gap: .8rem;
  }
}

/* ---------- 経歴・実績（写真＋テキストの2カラム） ---------- */
.career-wrap { max-width: 920px; margin-inline: auto; }

/* スマホ（〜767px）：縦積み（写真が上・テキストが下） */
.career {
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 5vw, 2.5rem);
}
/* 写真：固定幅 240px。flexで伸縮させない（flex-grow/shrink = 0） */
.career__figure {
  margin: 0;
  flex: 0 0 auto;
  width: 240px;
  max-width: 100%;
}
.career__figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;        /* 元画像の縦横比によらず正方形に近い縦長へ */
  object-fit: cover;
  object-position: 50% 20%;
}
/* テキスト：残り幅をすべて使う。min-width:0 で長い語による桁溢れを防ぐ */
.career__body { flex: 1 1 0; min-width: 0; }

/* PC（768px〜）：写真（左・240px固定）＋ テキスト（右）の横並び */
@media (min-width: 768px) {
  .career {
    flex-direction: row;
    align-items: flex-start;
    gap: clamp(2.5rem, 5vw, 4rem);
  }
  .career__figure { width: 240px; }
}

/* ---------- CTA band ---------- */
.section--cta { text-align: center; }
.cta-band { display: grid; justify-items: center; gap: 2rem; }
.cta-band__text {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  letter-spacing: .06em;
  line-height: 1.9;
  text-wrap: pretty;
}

/* ---------- FAQ ---------- */
.faq details { border-top: 1px solid var(--hairline); }
.faq details:last-child { border-bottom: 1px solid var(--hairline); }
.faq summary {
  list-style: none;
  position: relative;
  cursor: pointer;
  padding: 1.5rem 2.75rem 1.5rem 0;
  letter-spacing: .04em;
  font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "Q";
  margin-right: .9em;
  color: var(--gray-2);
  font-size: .9em;
  letter-spacing: .1em;
}
.faq__mark {
  position: absolute;
  top: 50%;
  right: .4rem;
  width: 12px;
  height: 12px;
  margin-top: -6px;
}
.faq__mark::before,
.faq__mark::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--ink);
  transition: transform .3s ease;
}
.faq__mark::after { transform: rotate(90deg); }
.faq details[open] .faq__mark::after { transform: rotate(0); }

.faq__body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .9em;
  padding: 0 2.75rem 1.75rem 0;
}
.faq__body::before {
  content: "A";
  color: var(--gray-2);
  font-size: .9em;
  letter-spacing: .1em;
}
.faq__body p { color: var(--ink-2); }

/* ---------- contact form ---------- */
.form {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  display: grid;
  gap: 1.75rem;
}
.form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.field { display: grid; gap: .6rem; }
.field label {
  font-size: .9rem;
  letter-spacing: .1em;
  color: var(--gray-1);
}
.field__optional {
  margin-left: .8em;
  font-size: .78em;
  letter-spacing: .08em;
  color: var(--gray-2);
  border: 1px solid var(--hairline);
  padding: .1em .6em;
}
.field input,
.field select,
.field textarea {
  font: inherit;
  letter-spacing: .02em;
  width: 100%;
  padding: .9em 1em;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--gray-3);
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { resize: vertical; min-height: 8em; line-height: 1.9; }
.field select {
  padding-right: 2.5em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23171615'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1em center;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.form__submit { justify-self: start; margin-top: .5rem; border: none; }
.form__note {
  font-size: .85rem;
  line-height: 1.9;
  color: var(--gray-1);
}

.form-status {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--hairline);
  font-size: .95rem;
  letter-spacing: .03em;
}
.form-status.is-success { border-color: var(--ink); }
.form-status.is-error { border-color: var(--gray-1); color: var(--ink); }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: clamp(3rem, 8vw, 5rem);
}
.site-footer__inner { display: grid; gap: .55rem; }
.site-footer__name { letter-spacing: .1em; }
.site-footer__addr { font-size: .9rem; color: var(--gray-1); }
.site-footer__links { margin-top: 1.25rem; font-size: .88rem; }
.site-footer__copy {
  margin-top: 1.75rem;
  font-size: .78rem;
  letter-spacing: .08em;
  color: var(--gray-2);
}

/* ---------- privacy dialog ---------- */
.dialog {
  padding: 0;
  border: 1px solid var(--ink);
  width: min(680px, calc(100% - 2rem));
  max-width: 680px;
  color: var(--ink);
  background: var(--white);
}
.dialog::backdrop { background: rgba(20, 19, 18, .55); }
.dialog__panel {
  position: relative;
  padding: clamp(1.75rem, 5vw, 3rem);
  max-height: 82vh;
  overflow-y: auto;
}
.dialog__close {
  position: absolute;
  top: .6rem;
  right: .8rem;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--gray-1);
}
.dialog__close:hover { color: var(--ink); }
.dialog h2 {
  font-size: 1.3rem;
  letter-spacing: .06em;
  margin-bottom: 1.5rem;
}
.dialog h3 {
  font-size: 1rem;
  letter-spacing: .04em;
  margin: 1.75rem 0 .5rem;
}
.dialog p { font-size: .92rem; line-height: 1.95; color: var(--ink-2); }
.dialog p + p { margin-top: .9rem; }
.dialog ul {
  margin: .5rem 0 0;
  padding-left: 1.25rem;
  font-size: .92rem;
  color: var(--ink-2);
}
.dialog__meta { margin-top: 2rem; font-size: .82rem; color: var(--gray-1); }

/* ---------- utilities ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: .75em 1.25em;
  background: var(--ink);
  color: var(--paper);
}
.skip-link:focus { left: 0; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
