/* ============================================================
   Chepics — service site
   Palette
     bg           #FFFFFF
     text         #141414
     primary      #F65B0A
     dark         #141414  (濃色セクション)
   ============================================================ */

:root {
  --bg: #FFFFFF;
  --text: #141414;
  --muted: #5F5F5F;

  /* primary */
  --accent: #F65B0A;        /* 面（ボタン・数字・罫）に使う原色 */
  --accent-deep: #C2450A;   /* 白地の小さな文字に使う濃いオレンジ */
  --accent-hover: #DB4E05;

  --rule: #E4E2DF;
  --ph: #E6E4E1;
  --ph-line: #D4D1CD;

  --dark: #141414;
  --on-dark: #FFFFFF;
  --on-dark-muted: #A8A8A8;

  --font: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
          "Hiragino Sans", "Yu Gothic", "Meiryo", "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

/* ---------- reset ---------- */

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

/* 基準を 18px にすることで、rem 指定の文字サイズが一律 1.125 倍になる。
   文字サイズを全体的に上げ下げしたいときは、ここだけ変更すればよい。 */
html {
  font-size: 112.5%;        /* 16px → 18px */
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;          /* = 18px */
  line-height: 1.8;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;

  /* 日本語は既定だとどの文字の間でも改行できてしまい、語の途中で切れる。
     auto-phrase は文節（ぶんせつ）単位で折り返す指定。
     未対応のブラウザでは単に無視され、従来どおりの折り返しになる。 */
  word-break: auto-phrase;
  line-break: strict;          /* 禁則処理を厳格に（小書き仮名や長音を行頭に置かない） */
}

/* 見出しと短いラベルは各行の長さを揃える（balance）。
   最終行に1〜2文字だけ残る「泣き別れ」を防ぐ。 */
h1, h2, h3,
.feature-title, .flow-title, .faq-q,
.stat-label, .item-name {
  text-wrap: balance;
}

/* 複数行になる本文は balance だと行長を揃えるために不自然な位置で切れるので、
   pretty（末尾の調整のみ）にして auto-phrase の判断に任せる。 */
.section-lead, .feature-body, .flow-text, .hero-desc,
.faq-a p, .bullets li,
.lead-note, .source, .deflist dd {
  text-wrap: pretty;
}

h1, h2, h3 { margin: 0; line-height: 1.45; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-deep); }
a:hover { color: var(--accent); }

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

/* ---------- layout ---------- */

/* 最大幅は設けず、常にビューポート全幅を使う。
   左右は画面端に文字が張り付かないための最小限の余白のみ。 */
.container {
  width: 100%;
  padding: 0 24px;
}

/* 全幅だと1行が長くなりすぎるセクション用。PC幅でのみ効く。 */
.container--narrow {
  max-width: 1008px;
  margin-inline: auto;
}

.section { padding: 84px 0; }
.section--white { background: var(--bg); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: saturate(180%) blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}
.brand {
  display: block;
  flex: 0 0 auto;
  line-height: 0;          /* img 下の余白を消す */
  text-decoration: none;
}
/* ロゴは高さで揃える。幅は元画像の比率のまま伸縮する */
.brand-logo {
  height: 28px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
  object-position: left center;
}
.header-cta {
  font-size: .875rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  border: 0;
  border-radius: 999px;                 /* カプセル型 */
  padding: 9px 22px;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(246, 91, 10, .28),
              0 1px 2px rgba(20, 20, 20, .08);
  transition: background-color .15s ease, box-shadow .2s ease, transform .15s ease;
}
.header-cta:hover {
  background: var(--accent-hover);
  color: #fff;
  box-shadow: 0 6px 16px rgba(246, 91, 10, .36),
              0 1px 3px rgba(20, 20, 20, .10);
  transform: translateY(-1px);
}
.header-cta:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(246, 91, 10, .28);
}

/* ---------- shared type ---------- */

.section-title {
  font-size: 2.25rem;
  letter-spacing: .01em;
  margin-bottom: 12px;
  text-align: center;
}

/* セクション見出しの下に置く導入文 */
.section-lead {
  margin: 24px auto 0;
  max-width: 64em;
  font-size: 1.0625rem;
  color: var(--muted);
  text-align: center;
}
.section-lead + .features { margin-top: 56px; }

.section-title + .features,
.section-title + .flow,
.section-title + .items-grid,
.section-title + .faq,
.section-title + .deflist,
.section-title + .subsection { margin-top: 32px; }

/* 各セクション末尾の補足文。左揃えで、上の区切り線は引かない。 */
.lead-note {
  margin-top: 48px;
  font-size: 1rem;
  color: var(--text);
  max-width: 46em;
}

.source {
  margin-top: 20px;
  font-size: .8125rem;
  line-height: 1.75;
  color: var(--muted);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  /* <button> はフォントや枠線をブラウザ既定から引き継ぐため、
     <a> のボタンと同じ見た目になるよう明示的に打ち消す */
  font-family: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.8;
  text-align: center;
  text-decoration: none;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding: 16px 40px;
  border-radius: 999px;                 /* カプセル型 */
  box-shadow: 0 6px 18px rgba(246, 91, 10, .30),
              0 1px 3px rgba(20, 20, 20, .10);
  transition: background-color .15s ease, box-shadow .2s ease, transform .15s ease;
}
.btn:hover {
  background: var(--accent-hover);
  color: #fff;
  box-shadow: 0 10px 26px rgba(246, 91, 10, .38),
              0 2px 5px rgba(20, 20, 20, .12);
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(246, 91, 10, .30);
}

/* 不活性状態。押せないことが見て分かるようにする */
.btn:disabled,
.btn:disabled:hover,
.btn:disabled:active {
  background: #D8D4CF;
  color: #6E6862;
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}

.hero-actions { margin-top: 32px; }

/* ---------- placeholders ---------- */

.ph {
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  background: var(--ph);
  border: 1px solid var(--ph-line);
  color: var(--muted);
  padding: 16px;
}
.ph--wide { aspect-ratio: 16 / 9; width: 100%; }
.ph--hero { aspect-ratio: 16 / 9; width: 100%; }
.ph--feature { aspect-ratio: 3 / 2; width: 100%; }
.ph--flow { aspect-ratio: 4 / 3; width: 100%; font-size: .8125rem; padding: 12px; }
.ph--square { aspect-ratio: 1 / 1; width: 100%; max-width: 88px; padding: 0; border-radius: 8px; }

.ph-label { font-size: .8125rem; font-weight: 700; letter-spacing: .04em; }
.ph-note  { font-size: .8125rem; line-height: 1.6; }

/* ---------- 1. hero ---------- */

.hero { padding-top: 76px; padding-bottom: 80px; }

/* 文字ブロック（中央揃え） → その下に大きな画像、という縦の流れ */
.hero-text {
  margin: 0 auto;
  text-align: center;
}

/* 汎用: 語句のまとまりを囲むと、その境目が優先的に改行位置になる。
   ブロックが画面幅に収まらない場合だけ、内部でも折り返す。
   見出しやリード文など「ここで切りたい」文言に使う。 */
.nb { display: inline-block; }
.hero-media { margin-top: 52px; }

.hero-image {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
}

/* 見出しの上に置くロゴ。高さ基準で表示し、横幅は元画像の比率のまま */
.hero-logo {
  height: 56px;
  width: auto;
  max-width: 100%;
  margin: 0 auto 28px;
  object-fit: contain;
}

.hero-title {
  /* 画面幅に追従させ、狭い画面でも語句が画面外にはみ出さないようにする。
     ここだけは px 指定にして、ルートの文字サイズ変更の影響を受けないようにしている。 */
  font-size: clamp(26px, 6.8vw, 46px);
  line-height: 1.3;
  letter-spacing: -.01em;
  margin: 0 auto 18px;
  max-width: 22em;
  text-wrap: balance;
}
.hero-sub {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 auto 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
  max-width: 34em;
}
.hero-desc {
  font-size: 1rem;
  color: var(--muted);
  max-width: 34em;
  margin: 0 auto;
}

/* ---------- 2. features（テキストと画像を左右交互に） ---------- */

.features {
  display: grid;
  gap: 72px;
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

/* 02 は 01 と左右を反転させる。
   DOM 上はテキストが先（読み上げ順を保つ）で、表示位置だけ入れ替える。 */
.feature--reverse .feature-text  { order: 2; }
.feature--reverse .feature-media { order: 1; }

/* テキストは自分の表示領域（カラム）内で中央寄せにする。
   左寄せのままだと、行長制限のぶん画像から大きく離れて見えるため。 */
.feature-text { text-align: center; }

.feature-title {
  font-size: 1.5rem;
  line-height: 1.5;
  margin: 0 auto 16px;
  max-width: 18em;
}
.feature-body {
  font-size: 1rem;
  color: var(--muted);
  max-width: 30em;
  margin: 0 auto;
}

.feature-image {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 12px;
}

/* ---------- 3. two column ---------- */

.bullets li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  color: var(--text);
}
.bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .78em;
  width: 8px;
  height: 2px;
  background: var(--accent);
}
.bullets--wide { max-width: 56em; margin-inline: auto; }
.bullets strong { font-weight: 700; color: var(--text); }

/* ---------- 3. 仕組み（縦のフロー図） ----------
   丸いノードを縦に並べ、ノードどうしを線でつなぐ。
   線は各ステップの ::before で引き、最後のステップだけ引かない。 */

.flow {
  --node: 60px;      /* ノードの直径 */
  --line: 2px;       /* つなぎ線の太さ */
  --media: 220px;    /* 右に置く画像の幅 */

  max-width: 62em;
  margin-inline: auto;   /* 左端を中央側に寄せる */
}

.flow-step {
  position: relative;
  display: grid;
  grid-template-columns: var(--node) 1fr var(--media);
  gap: 28px;
  padding-bottom: 44px;
  align-items: start;
}
.flow-step:last-child { padding-bottom: 0; }

/* ノードとノードをつなぐ縦線 */
.flow-step::before {
  content: "";
  position: absolute;
  left: calc(var(--node) / 2 - var(--line) / 2);
  top: var(--node);
  bottom: 0;
  width: var(--line);
  background: var(--rule);
}
.flow-step:last-child::before { content: none; }

.flow-node {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--node);
  height: var(--node);
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.flow-body { padding-top: 12px; }   /* 見出しの1行目をノードの中心に合わせる */
.flow-title { font-size: 1.375rem; margin-bottom: 8px; }
.flow-text { font-size: 1.125rem; color: var(--muted); }

.flow-image {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
}

/* ---------- 5. items ---------- */

.items-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px 16px;
}
.item { display: block; }

/* プレースホルダー（.ph--square）を <img> に差し替えたときに同じ見た目で収まる */
.item-image {
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 88px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.item-name {
  display: block;
  margin-top: 10px;
  font-size: .875rem;
  line-height: 1.55;
  color: var(--text);
}

/* 一覧が「例」であることを示す1行 */
.items-more {
  margin-top: 28px;
  font-size: .9375rem;
  color: var(--muted);
}
.items-more + .lead-note { margin-top: 20px; }

/* ---------- 7 / 8. stats ---------- */

.stats {
  display: grid;
  gap: 16px;
  margin-bottom: 32px;
}
.stats--3 { grid-template-columns: repeat(3, 1fr); }

.stat {
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 24px 22px;
}

.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--accent);
  margin-bottom: 8px;
}
.stat-label {
  display: block;
  font-size: .875rem;
  line-height: 1.7;
  color: var(--muted);
}

.subsection { margin-bottom: 56px; }
.subsection:last-child { margin-bottom: 0; }
.subsection-title {
  font-size: 1.375rem;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
  text-align: center;
}

/* ---------- 9. FAQ ---------- */

.faq { border-top: 2px solid var(--text); }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-heading { margin: 0; font-size: inherit; font-weight: inherit; }

.faq-q {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  background: none;
  border: 0;
  padding: 20px 0;
  font: inherit;
  font-weight: 700;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  line-height: 1.6;
}
.faq-q:hover { color: var(--accent-deep); }
.faq-q-text::before {
  content: "Q. ";
  color: var(--accent);
  font-weight: 700;
}

.faq-icon {
  position: relative;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: .45em;
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 14px;
  height: 2px;
  background: var(--accent);
}
.faq-icon::after { transform: rotate(90deg); transition: transform .15s ease; }
.faq-q[aria-expanded="true"] .faq-icon::after { transform: rotate(0deg); }

.faq-a { padding: 0 0 22px; }
.faq-a p {
  color: var(--muted);
  max-width: 52em;
  padding-left: 1.6em;
}

/* ---------- 7. 会社概要 ---------- */

.deflist {
  display: grid;
  grid-template-columns: 10em minmax(0, 1fr);
  max-width: 64em;
  margin-inline: auto;
  border-top: 1px solid var(--rule);
}
.deflist dt,
.deflist dd {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.deflist dt { color: var(--muted); font-size: .9375rem; }
/* 住所など区切りのない長い文字列が、列からはみ出さないようにする */
.deflist dd { overflow-wrap: anywhere; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--dark);
  color: var(--on-dark-muted);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}
.footer-logo {
  height: 26px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  object-position: left center;
  flex: 0 0 auto;
}
.footer-note { font-size: .8125rem; line-height: 1.7; }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
  .items-grid { grid-template-columns: repeat(4, 1fr); }
  .feature { gap: 32px; }
  .features { gap: 56px; }
  .feature-title { font-size: 1.3125rem; }
  .flow { --media: 170px; }
  .flow-step { gap: 22px; }
}

@media (max-width: 720px) {
  body { line-height: 1.8; }

  .section { padding: 56px 0; }
  .container { padding: 0 20px; }

  .hero { padding-top: 44px; padding-bottom: 56px; }
  .hero-logo { height: 40px; margin-bottom: 20px; }
  .hero-media { margin-top: 36px; }
  /* スマホでは少し縦長にして存在感を保つ */
  .ph--hero,
  .hero-image { aspect-ratio: 4 / 3; }
  .hero-sub { font-size: 1.0625rem; }
  .brand-logo { height: 24px; max-width: 150px; }
  .footer-logo { height: 22px; }

  .section-title { font-size: 1.875rem; }

  /* 縦積み。反転指定を解除して、どちらも テキスト → 画像 の順に揃える */
  .features { gap: 48px; }
  .feature { grid-template-columns: 1fr; gap: 24px; }
  .feature--reverse .feature-text,
  .feature--reverse .feature-media { order: 0; }
  .feature-title { font-size: 1.25rem; }

  /* 画像はテキストの下（ノードの右側の列）に回り込ませる */
  .flow { --node: 48px; }
  .flow-step {
    grid-template-columns: var(--node) 1fr;
    gap: 16px;
    padding-bottom: 36px;
  }
  .flow-body { padding-top: 8px; }
  .flow-title { font-size: 1.25rem; }
  .flow-media { grid-column: 2; margin-top: 16px; max-width: 260px; }

  .items-grid { grid-template-columns: repeat(3, 1fr); gap: 16px 12px; }

  .stats--3 { grid-template-columns: 1fr; }
  .stat-num { font-size: 1.75rem; }

  .deflist { grid-template-columns: 7em minmax(0, 1fr); }
  .section-lead { font-size: 1rem; }

  /* <button> は display:block だけでは幅が伸びないので width も指定する */
  .btn { display: block; width: 100%; text-align: center; }
  .header-cta { font-size: .8125rem; padding: 7px 12px; }
}

@media (max-width: 400px) {
  .items-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- anchor offset (sticky header) ---------- */
[id] { scroll-margin-top: 76px; }

/* ============================================================
   お問い合わせページ（contact.html）
   ============================================================ */

.container--form { max-width: 720px; margin-inline: auto; }

/* ヘッダー直下の帯。ページタイトルをこの中に表示する */
.page-band {
  background: linear-gradient(100deg,
              #FF8340 0%,
              var(--accent) 42%,
              #C2450A 100%);
  padding: 56px 0;
}
.page-band-title {
  font-size: 2.25rem;
  color: #fff;
  text-align: center;
  letter-spacing: .02em;
  text-wrap: balance;
}

/* 帯がタイトルの役割を担うので、本文側の上余白は詰める */
.page-band + .section { padding-top: 56px; }

.form { margin-top: 48px; }

.field { margin-bottom: 28px; }

.field-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  margin-bottom: 8px;
}
.req, .opt {
  font-size: .75rem;
  font-weight: 700;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 3px;
  letter-spacing: .04em;
}
.req { background: var(--accent); color: #fff; }
.opt { background: #EFEDEA; color: var(--muted); }

.input {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid #CFCBC6;
  border-radius: 8px;
  padding: 13px 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder { color: #9A948D; }
.input:hover { border-color: #B4AFA9; }
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(246, 91, 10, .18);
}
.input[aria-invalid="true"] {
  border-color: #C0392B;
  background: #FDF6F5;
}

.textarea { resize: vertical; min-height: 200px; line-height: 1.8; }

/* select の三角は背景画像を使わず、CSSだけで描く */
.select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text) 50%),
    linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% + 2px),
    calc(100% - 14px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 42px;
  cursor: pointer;
}

.field-note {
  margin-top: 8px;
  font-size: .875rem;
  color: var(--muted);
}
.field-error {
  margin-top: 8px;
  font-size: .875rem;
  font-weight: 700;
  color: #C0392B;
}

.form-note {
  font-size: .875rem;
  color: var(--muted);
  margin-top: 32px;
}

.form-actions { margin-top: 32px; text-align: center; }

.form-alert {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #FDF6F5;
  border: 1px solid #E8C8C3;
  color: #A5342A;
  font-size: .9375rem;
  font-weight: 700;
  text-align: center;
}

/* 送信完了 */
.form-done {
  margin-top: 56px;
  padding: 48px 32px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  text-align: center;
}
.form-done:focus { outline: none; }
.form-done-title { font-size: 1.5rem; margin-bottom: 16px; }
.form-done-text { color: var(--muted); }

/* 送信用の iframe は見せない（display:none だと送信できない環境があるため） */
#gform-sink {
  position: absolute;
  width: 0;
  height: 0;
  border: 0;
  visibility: hidden;
}

@media (max-width: 720px) {
  .page-band { padding: 40px 0; }
  .page-band-title { font-size: 1.875rem; }
  .page-band + .section { padding-top: 40px; }

  .form { margin-top: 36px; }
  .field { margin-bottom: 24px; }
  .textarea { min-height: 160px; }
  .form-done { padding: 36px 20px; }
  .form-done-title { font-size: 1.3125rem; }
}

/* お問い合わせページでは、補助的な文もグレーにせず本文と同じ黒で表示する */
.page-contact .section-lead,
.page-contact .field-note,
.page-contact .form-note,
.page-contact .form-done-text,
.page-contact .opt {
  color: var(--text);
}
