/*
Theme Name: ココジム
Theme URI: https://cocojm.jp/
Template: twentytwentyfive
Description: ココジム用 Twenty Twenty-Five 子テーマ（あたたかB案／ミント×コーラル）
Author: ソライト合同会社
Version: 0.5.1
Requires at least: 6.7
Requires PHP: 7.4
Text Domain: cocojm
*/

/* 色・フォントは theme.json で管理。ここは部品のかたちだけ */
:root {
  --cj-radius: 22px;
  --cj-radius-lg: 32px;
  --cj-shadow: 0 6px 20px rgba(30, 70, 60, .07);
  --cj-shadow-hover: 0 12px 30px rgba(30, 70, 60, .12);
  --cj-primary: var(--wp--preset--color--primary);
  --cj-accent: var(--wp--preset--color--accent);
  --cj-accent-text: var(--wp--preset--color--accent-text);
  --cj-muted: var(--wp--preset--color--muted);
  --cj-line: var(--wp--preset--color--line);
  --cj-alt: var(--wp--preset--color--base-alt);
  --cj-latin: "Zen Maru Gothic", sans-serif;
}
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { -webkit-text-size-adjust: 100%; }
h1, h2, h3 { text-wrap: balance; }
h1 em, h2 em { font-style: normal; color: var(--cj-primary); }

/* ---------- ボタン ---------- */
.wp-block-button__link { transition: transform .2s, box-shadow .2s, background .2s, color .2s; }
.wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover { transform: translateY(-2px); box-shadow: var(--cj-shadow-hover); }
.wp-block-button.is-style-outline > .wp-block-button__link {
  background: transparent; color: var(--cj-primary); border: 2px solid var(--cj-primary);
  padding: calc(.85em - 2px) calc(1.6em - 2px);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--cj-primary); color: #fff; }

/* ---------- ヘッダー ---------- */
header.wp-block-template-part:has(.cj-header) { position: sticky; top: 0; z-index: 50; }
.admin-bar header.wp-block-template-part:has(.cj-header) { top: 32px; }
@media (max-width: 782px) { .admin-bar header.wp-block-template-part:has(.cj-header) { top: 46px; } }
@media (max-width: 600px) { .admin-bar header.wp-block-template-part:has(.cj-header) { top: 0; } }
.cj-header {
  background: rgba(246, 252, 250, .86);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--cj-line);
}
.cj-header__inner { min-height: 68px; gap: 24px; }
.cj-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--wp--preset--color--contrast); }
.cj-logo:hover { color: var(--wp--preset--color--contrast); }
.cj-logo svg { width: 34px; height: 34px; flex: none; }
.cj-logo__name { font-family: var(--wp--preset--font-family--zen-maru-gothic); font-weight: 700; font-size: 1.15rem; line-height: 1.15; }
.cj-logo__sub { display: block; font-size: .68rem; color: var(--cj-muted); font-weight: 500; letter-spacing: .12em; }
.cj-nav { font-size: .92rem; font-weight: 500; gap: 22px; }
.cj-nav a { text-decoration: none; color: var(--wp--preset--color--contrast); }
.cj-nav a:hover { color: var(--cj-primary); }

/* ---------- セクション共通 ---------- */
.cj-section { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(56px, 8vw, 104px); }
.cj-section--alt { background: var(--cj-alt); }
.cj-title { text-align: center; margin-bottom: clamp(32px, 5vw, 56px) !important; }
.cj-title h2 { margin: 0 0 .3em; }
.cj-title p { color: var(--cj-muted); margin: 0; }
.cj-eyebrow {
  font-family: var(--cj-latin); font-size: .78rem; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--cj-accent-text); margin-bottom: 14px !important;
}
.cj-lead { color: var(--cj-muted); font-size: 1.02rem; }

/* ---------- ヒーロー ---------- */
.cj-hero {
  padding-top: clamp(48px, 8vw, 110px); padding-bottom: clamp(56px, 8vw, 110px);
  background:
    radial-gradient(900px 420px at 85% 10%, color-mix(in srgb, var(--cj-primary) 12%, transparent), transparent 70%),
    var(--wp--preset--color--base);
}
.cj-hero__cols { gap: clamp(28px, 5vw, 64px) !important; }
.cj-hero h1 { margin-top: 0; }
.cj-hero .wp-block-buttons { margin-top: 28px; }
.cj-hero__visual { margin: 0; }
.cj-hero__visual img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--cj-radius-lg); box-shadow: var(--cj-shadow); }

/* ---------- お困りごと ---------- */
.cj-problems { gap: 16px !important; }
.cj-problem {
  position: relative; margin: 0 !important; background: #fff; border-radius: var(--cj-radius);
  padding: 18px 20px 18px 56px; box-shadow: var(--cj-shadow); font-weight: 500; line-height: 1.7;
}
.cj-problem::before {
  content: ""; position: absolute; left: 20px; top: 20px; width: 22px; height: 22px; border-radius: 50%;
  background: color-mix(in srgb, var(--cj-accent) 28%, #fff)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c44c3e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.cj-problems-arrow { text-align: center; margin-top: 40px !important; font-family: var(--wp--preset--font-family--zen-maru-gothic); font-weight: 700; font-size: 1.15rem; color: var(--cj-primary); }
.cj-problems-arrow::before { content: ""; display: block; width: 0; height: 0; margin: 0 auto 14px; border: 16px solid transparent; border-top: 18px solid var(--cj-accent); border-bottom: 0; }

/* ---------- 伴走・実績 ---------- */
.cj-along-text { max-width: 760px; margin-inline: auto !important; text-align: center; }
.cj-stats { gap: 1px !important; background: var(--cj-line); border: 1px solid var(--cj-line); border-radius: var(--cj-radius); overflow: hidden; margin-top: 40px !important; }
.cj-stat { background: #fff; padding: 22px 16px; text-align: center; margin: 0 !important; }
.cj-stat > * { margin: 0 !important; }
.cj-stat__num { font-family: var(--cj-latin); font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; color: var(--cj-primary); line-height: 1.2; }
.cj-stat__label { font-size: .85rem; color: var(--cj-muted); margin-top: 4px !important; }

/* ---------- カード ---------- */
.cj-cards { gap: clamp(16px, 2.4vw, 28px) !important; }
.cj-card {
  background: #fff; border-radius: var(--cj-radius); padding: 28px 26px 26px; margin: 0 !important;
  box-shadow: var(--cj-shadow); transition: transform .25s, box-shadow .25s;
}
.cj-card:hover { transform: translateY(-4px); box-shadow: var(--cj-shadow-hover); }
.cj-card > * { margin-top: 0 !important; }
.cj-card h3 { margin-bottom: .4em; }
.cj-card p { color: var(--cj-muted); font-size: .93rem; margin-bottom: 0; }
.cj-card__icon {
  width: 56px; height: 56px; border-radius: 20px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--cj-accent) 20%, #fff); color: var(--cj-primary); margin-bottom: 16px;
}
.cj-card__icon svg { width: 30px; height: 30px; }
.cj-card p.cj-card__for { margin-top: 14px; font-size: .75rem; color: var(--cj-muted); }
.cj-card p.cj-card__for::before { content: "対象："; }

/* ---------- 代表者 ---------- */
.cj-profile { background: #fff; border-radius: var(--cj-radius-lg); padding: clamp(24px, 4vw, 44px); box-shadow: var(--cj-shadow); gap: clamp(24px, 4vw, 48px) !important; }
.cj-profile figure { margin: 0; }
.cj-profile img { border-radius: var(--cj-radius-lg); aspect-ratio: 1; object-fit: cover; width: 100%; }
.cj-profile h3 { margin-top: 0; }
.cj-timeline { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.cj-timeline li { font-size: .93rem; padding-left: 0; }
.cj-timeline strong { display: inline-block; min-width: 4.5em; font-family: var(--cj-latin); color: var(--cj-primary); }

/* ---------- 流れ ---------- */
.cj-flow { counter-reset: step; gap: 16px !important; }
.cj-step { counter-increment: step; background: #fff; border-radius: var(--cj-radius); padding: 22px 20px; box-shadow: var(--cj-shadow); margin: 0 !important; }
.cj-step > * { margin-top: 0 !important; }
.cj-step::before {
  content: "STEP " counter(step, decimal-leading-zero); display: block; font-family: var(--cj-latin);
  font-size: .75rem; font-weight: 700; letter-spacing: .14em; color: var(--cj-accent-text); margin-bottom: 6px;
}
.cj-step h3 { font-size: 1.02rem; margin-bottom: .3em; }
.cj-step p { font-size: .88rem; color: var(--cj-muted); margin: 0; }

/* ---------- フッター ---------- */
.cj-footer { background: var(--wp--preset--color--contrast); color: color-mix(in srgb, #fff 80%, var(--wp--preset--color--contrast)); padding-top: 48px; padding-bottom: 28px; font-size: .88rem; }
.cj-footer a, .cj-footer .cj-logo { color: inherit; text-decoration: none; }
.cj-footer a:hover { color: #fff; text-decoration: underline; }
.cj-footer .cj-logo { color: #fff; }
.cj-footer .cj-logo svg { --outer: #fff; }
.cj-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.cj-footer__copy { margin-top: 36px !important; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.15); font-size: .75rem; opacity: .7; }

/* マークの色（ヘッダー＝ミント／コーラル、フッター＝白／コーラル） */
.cj-mark .o { stroke: var(--outer, var(--cj-primary)); }
.cj-mark .i { stroke: var(--cj-accent); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cj-card, .wp-block-button__link { transition: none; }
}

/* セクション同士の余白をなくす（色帯を密着させる） */
.wp-block-post-content > .alignfull { margin-block-start: 0 !important; margin-block-end: 0 !important; }
.wp-site-blocks > header.wp-block-template-part:has(.cj-header) + *,
.wp-site-blocks > footer.wp-block-template-part:has(.cj-footer) { margin-block-start: 0; }

/* 実績は3つ固定（空きマスに罫線色が出ないように） */
.cj-stats { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
@media (max-width: 600px) { .cj-stats { grid-template-columns: 1fr !important; } }

@media (max-width: 600px) {
  .cj-hero h1 { font-size: 1.55rem; }
  .cj-profile figure { max-width: 200px; margin-inline: auto; }
}

/* ---------- 下層ページ ---------- */
.cj-page-head {
  padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(40px, 6vw, 72px);
  background:
    radial-gradient(700px 300px at 90% 0%, color-mix(in srgb, var(--cj-accent) 16%, transparent), transparent 70%),
    var(--cj-alt);
}
.cj-page-head .wp-block-post-title { margin: 0; font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
.cj-page-head + .wp-block-post-content { margin-block-start: 0 !important; }
.wp-block-post-content > :not(.alignfull):first-child { margin-top: clamp(40px, 6vw, 72px); }

/* ページ内リンク（チップ） */
.cj-chips { justify-content: center; gap: 10px !important; margin-top: 28px !important; }
.cj-chips .wp-block-button__link { font-size: .85rem; padding: calc(.6em - 2px) calc(1.2em - 2px); }

/* サービス詳細 */
.cj-svc-head { gap: 18px !important; margin-bottom: 18px !important; }
.cj-svc-head .cj-card__icon { width: 72px; height: 72px; border-radius: 24px; margin: 0; background: #fff; box-shadow: var(--cj-shadow); }
.cj-section--alt .cj-svc-head .cj-card__icon { background: #fff; }
.cj-svc-head .cj-card__icon svg { width: 38px; height: 38px; }
.cj-svc-head h2 { margin: 0; }
.cj-svc-head .cj-eyebrow { margin: 0 0 2px !important; }
.cj-svc-lead { max-width: 760px; color: var(--cj-muted); }
.cj-svc-cols { margin-top: 28px !important; gap: clamp(20px, 3vw, 36px) !important; }
.cj-svc-cols h3 { font-size: 1.02rem; margin: 0 0 .7em; }
.cj-checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.cj-checklist li { position: relative; padding-left: 30px; line-height: 1.7; }
.cj-checklist li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 20px; height: 20px; border-radius: 50%;
  background: color-mix(in srgb, var(--cj-primary) 16%, #fff)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2323806f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.cj-svc-for { background: #fff; border-radius: var(--cj-radius); padding: 24px 24px 22px; box-shadow: var(--cj-shadow); }
.cj-section--alt .cj-svc-for { background: var(--wp--preset--color--base); }
.cj-svc-for ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: .93rem; }
.cj-svc-for li::marker { color: var(--cj-accent-text); }

/* 締めの帯 */
.cj-cta-band { background: var(--wp--preset--color--primary); color: #fff; border-radius: var(--cj-radius-lg); padding: clamp(32px, 5vw, 56px); text-align: center; }
.cj-cta-band h2 { color: #fff; font-size: clamp(1.3rem, 2.6vw, 1.8rem); margin-top: 0; }
.cj-cta-band p { opacity: .9; }
.cj-cta-band .wp-block-buttons { justify-content: center; margin-top: 20px; }
.cj-more { justify-content: center; margin-top: 36px !important; }
.cj-center { text-align: center; }
.cj-svc-lead { margin-left: max(0px, calc((100% - 1120px) / 2)) !important; }
/* 同じ背景色のセクションが続くときは上の余白を詰める */
.cj-section:not(.cj-section--alt) + .cj-section:not(.cj-section--alt),
.cj-section--alt + .cj-section--alt { padding-top: 0; }

/* =========================================================
   メリハリ調整 v0.3
   ========================================================= */
/* 強調語に蛍光マーカー */
.cj-hero h1 em, .cj-problems-arrow em, #along h2 em {
  background: linear-gradient(transparent 64%, color-mix(in srgb, var(--cj-accent) 45%, transparent) 64%);
  padding: 0 .08em;
}

/* ヒーロー：見出しを一段大きく */
.cj-hero h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.4; }
.cj-hero .cj-lead { font-size: 1.05rem; }

/* セクション見出し：大きく＋下にコーラルのアクセント */
.cj-title h2 { font-size: clamp(1.65rem, 3.4vw, 2.4rem); }
.cj-title h2::after {
  content: ""; display: block; width: 44px; height: 4px; border-radius: 4px;
  background: var(--cj-accent); margin: .5em auto 0;
}
.cj-title p { font-size: 1.02rem; margin-top: .4em; }

/* お困りごと → 解決 の転換をいちばん目立たせる */
.cj-problems-arrow {
  margin-top: clamp(48px, 7vw, 80px) !important;
  font-size: clamp(1.55rem, 3.6vw, 2.5rem) !important;
  line-height: 1.55; letter-spacing: .06em;
  color: var(--wp--preset--color--contrast) !important;
}
.cj-problems-arrow em { color: var(--cj-primary); }
.cj-problems-arrow::before {
  width: 64px !important; height: 34px !important; border: 0 !important; margin-bottom: 22px !important;
  background: var(--cj-accent);
  -webkit-clip-path: polygon(0 0, 22% 0, 50% 55%, 78% 0, 100% 0, 50% 100%);
          clip-path: polygon(0 0, 22% 0, 50% 55%, 78% 0, 100% 0, 50% 100%);
}

/* 実績の数字を大きく */
.cj-stat { padding: 28px 16px; }
.cj-stat__num { font-size: clamp(2.3rem, 4.4vw, 3.3rem); }
.cj-stat__label { font-size: .9rem; font-weight: 500; }

/* サービスカード：見出しを強く、上辺にミントの線 */
.cj-card { position: relative; overflow: hidden; }
.cj-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--cj-primary); opacity: .85; }
.cj-card h3 { font-size: 1.3rem; }

/* 流れ：番号を大きく */
.cj-step::before {
  content: counter(step, decimal-leading-zero);
  font-size: 2.2rem; line-height: 1; letter-spacing: .02em; margin-bottom: 10px; color: var(--cj-accent);
}
.cj-step h3 { font-size: 1.12rem; }

@media (max-width: 600px) {
  .cj-hero h1 { font-size: 1.6rem; }
}
/* ヒーロー見出しは「〜運営を、」で改行が崩れない上限に */
.cj-hero h1 { font-size: clamp(2rem, 3.5vw, 2.75rem); }
@media (max-width: 600px) { .cj-hero h1 { font-size: 1.6rem; } }
@media (max-width: 600px) { .cj-hero h1 { font-size: clamp(1.25rem, calc((100vw - 60px) / 13), 1.6rem); } }
@media (max-width: 600px) {
  .cj-hero h1 { font-size: clamp(1.2rem, calc((100vw - 64px) / 14), 1.6rem); }
  .cj-problems-arrow { font-size: clamp(1.15rem, calc((100vw - 64px) / 15), 1.6rem) !important; }
}

/* =========================================================
   PC表示の本文サイズ v0.4（説明文を読みやすく）
   ========================================================= */
@media (min-width: 782px) {
  body { font-size: 17px; }
  .cj-nav { font-size: 1rem; }
  .cj-lead, .cj-hero .cj-lead { font-size: 1.15rem; line-height: 1.9; }
  .cj-title p { font-size: 1.1rem; }
  .cj-problem { font-size: 1.06rem; }
  .cj-along-text, .cj-svc-lead { font-size: 1.1rem; line-height: 1.95; }
  .cj-stat__label { font-size: 1rem; }
  .cj-card p { font-size: 1.02rem; line-height: 1.85; }
  .cj-card p.cj-card__for { font-size: .85rem; }
  .cj-timeline li { font-size: 1.02rem; }
  .cj-step p { font-size: 1rem; line-height: 1.8; }
  .cj-checklist li { font-size: 1.06rem; }
  .cj-svc-for ul { font-size: 1.02rem; }
  .cj-footer { font-size: .95rem; }
  /* 文字が大きくなる分、サービスカードは最小幅を広げて窮屈にしない */
  .cj-cards { grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)) !important; }
}
/* サービスカードはPCで2列×2段（1行の文字数を確保して読みやすく） */
@media (min-width: 782px) {
  .cj-cards { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .cj-card { padding: 32px 34px 30px; }
}

/* =========================================================
   スマホ表示の本文サイズ v0.5（小さい文字を16px以上に）
   ========================================================= */
@media (max-width: 781px) {
  html { font-size: 106.25%; } /* 1rem = 17px */
  .cj-lead, .cj-hero .cj-lead { font-size: 1.06rem; line-height: 1.9; }
  .cj-title p { font-size: 1.03rem; }
  .cj-problem { font-size: 1.03rem; }
  .cj-along-text, .cj-svc-lead { font-size: 1.05rem; line-height: 1.9; }
  .cj-stat__label { font-size: .97rem; }
  .cj-card p { font-size: 1rem; line-height: 1.85; }
  .cj-card p.cj-card__for { font-size: .85rem; }
  .cj-timeline li { font-size: 1rem; }
  .cj-step p { font-size: 1rem; line-height: 1.8; }
  .cj-checklist li { font-size: 1.03rem; }
  .cj-svc-for ul { font-size: 1rem; }
  .cj-footer { font-size: .95rem; }
}
