/* ==========================================================================
   デザイン案C2「夜明け＋写真」— Cを土台に写真素材・図解・上部バーを追加。段階①②③を 夜 → 明け方 → 朝 の色で表す
   全体 = Zen Maru Gothic（最大700。900は「回」がつぶれるため不使用）
   ========================================================================== */

:root {
  --white: #ffffff;
  --ink: #1f2638;           /* 夜の藍を黒のかわりに */
  --soft: #535c70;
  --night: #273452;         /* ① はじまり＝夜 */
  --dawn: #f2b28c;          /* ② 途中＝明け方（杏） */
  --sun: #ffd35a;           /* ③ 回復期＝朝の光 */
  --sun-soft: #fff1c2;
  --sky: #dcecf6;
  --leaf: #d5ecc9;
  --mist: #eef1f5;
  --font: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
  --measure: 36em;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.95;
  letter-spacing: 0.03em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3 {
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
  font-feature-settings: "palt";
  text-wrap: balance;
  word-break: auto-phrase;
}

p { margin: 0 0 1.3em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--night);
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--sun);
  text-underline-offset: 4px;
}
a:hover { text-decoration-color: var(--dawn); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 2px;
}

img { max-width: 100%; height: auto; display: block; }
strong { font-weight: 700; }

/* ---------- レイアウト（色面を順に重ねる） ---------- */

.section__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding-inline: 1.25rem;
}

.section { padding-block: 3.75rem; }

/* D: 並び替えに合わせて、色面は位置でなくclassで指定する */
.section--sky { background: var(--sky); }             /* 僕も不登校を経験しました */
.section--leaf { background: var(--leaf); }           /* やること／やらないこと */
.section--muted { background: var(--mist); }

.section h2 {
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  margin: 0 0 1.1em;
}

.subhead {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 2em 0 0.8em;
}

.lead { font-size: 1.06em; font-weight: 700; }

.note {
  font-size: 0.88em;
  color: var(--soft);
}

.u-center { text-align: center; }

/* ---------- ヒーロー（空色の上に文字、その下から朝日の写真） ---------- */

.hero {
  position: relative;
  padding: 3rem 0 0;
  background: var(--sky);
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 72rem;
  margin: 0 auto;
  padding-inline: 1.25rem;
}

.hero__title {
  font-size: clamp(2rem, 9.4vw, 3.6rem);
  line-height: 1.22;
  letter-spacing: 0.01em;
  margin: 0 0 0.55em;
}

.hero__subtitle {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.8;
  margin: 0 0 1.1em;
  max-width: 24em;
  word-break: auto-phrase;
}

.hero__img {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 70%;
  margin-top: -1.5rem;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 28%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 28%);
}

/* ---------- ボタン ---------- */

.btn {
  display: inline-block;
  padding: 0.95em 1.7em;
  border-radius: 999px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn--primary {
  background: var(--night);
  color: var(--white);
}
.btn--primary:hover {
  color: var(--white);
  background: #1b2540;
  transform: translateY(-2px);
}
.btn--primary:disabled {
  background: #a7afbf;
  cursor: not-allowed;
  transform: none;
}

/* ---------- キッカー ---------- */

.kicker {
  max-width: var(--measure);
  margin: 3.25rem auto -1.75rem;
  padding-inline: 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--soft);
  letter-spacing: 0.1em;
}
.kicker::before {
  content: "";
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: var(--dawn);
  margin-right: 0.55em;
  vertical-align: 0.02em;
}

/* ---------- コールアウト ---------- */

.callout {
  margin-top: 2em;
  padding: 1.3em 1.4em;
  background: var(--white);
  border-radius: 18px;
}
.callout p { margin-bottom: 0.6em; }
.callout p:last-child { margin-bottom: 0; }

/* ---------- 段階カード（夜 → 明け方 → 朝） ---------- */

.stage-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  margin: 2em 0;
}

.stage-card {
  padding: 1.5em 1.4em 1.6em;
  border-radius: 22px;
  background: var(--night);
  color: #eef1f8;
}
.stage-card:nth-child(2) { background: var(--dawn); color: var(--ink); }
.stage-card--main { background: var(--sun); color: var(--ink); }

.stage-card__num {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  margin: 0 0 0.3em;
  color: var(--sun);
}
.stage-card:nth-child(2) .stage-card__num { color: var(--white); }
.stage-card--main .stage-card__num { color: var(--ink); }

.stage-card__title {
  font-size: 1.2rem;
  margin: 0 0 0.9em;
  color: inherit;
}

.stage-card dl { margin: 0; }
.stage-card dt {
  display: inline-block;
  font-size: 0.78em;
  font-weight: 700;
  padding: 0.1em 0.8em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  margin: 1.1em 0 0.45em;
}
.stage-card:nth-child(2) dt,
.stage-card--main dt { background: rgba(255, 255, 255, 0.6); }
.stage-card dt:first-child { margin-top: 0; }
.stage-card dd { margin: 0; font-size: 0.95em; }

/* ---------- 料金 ---------- */

.price-list {
  list-style: none;
  margin: 1.2em 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.price-list li {
  padding: 1.2em 1.3em;
  background: var(--mist);
  border-radius: 18px;
}
/* 9/28: 先頭だけの背景色を廃止（2項目を同じレイヤーに） */
.price-list__label { font-weight: 700; margin: 0 0 0.3em; }
.price-list__value {
  font-weight: 700;
  font-size: 1.1em;
  margin: 0 0 0.5em;
  font-variant-numeric: tabular-nums;
}
.price-list__note {
  font-size: 0.9em;
  color: var(--soft);
  margin: 0.6em 0 0;
}

/* ---------- プロフィール ---------- */

.section--profile { background: var(--sun-soft) !important; }
.section__inner--profile { max-width: 46em; }

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8rem;
}
.profile__photo {
  width: 230px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 50% 14%;
  border-radius: 50%;
  background: var(--white);
  border: 8px solid var(--sun);
}
.profile__text { width: 100%; }
.profile__name {
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 0.8em;
}

/* ---------- お問い合わせ（夜の色面に白い紙） ---------- */

.section--contact {
  background: var(--night) !important;
  color: #eef1f8;
}
.section--contact h2 { color: var(--white); text-align: center; }
.section--contact .lead { margin-bottom: 1.8em; color: var(--sun); }
.section--contact .note { color: #c4cad8; }
.section--contact .form-fallback a { color: var(--white); }

.contact-form {
  max-width: 32em;
  margin: 0 auto;
  padding: 1.6em 1.25em;
  background: var(--white);
  color: var(--ink);
  border-radius: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-group { margin-bottom: 1.3em; }
.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.92em;
  margin-bottom: 0.45em;
}

.req {
  display: inline-block;
  font-size: 0.72em;
  font-weight: 700;
  color: var(--ink);
  background: var(--sun);
  border-radius: 999px;
  padding: 0.05em 0.6em;
  vertical-align: middle;
  margin-left: 0.2em;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.75em 0.95em;
  font-family: var(--font);
  font-weight: 500;
  font-size: 1em;
  color: var(--ink);
  background: var(--mist);
  border: 2px solid transparent;
  border-radius: 12px;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--night);
  background: var(--white);
}
.contact-form textarea { resize: vertical; line-height: 1.7; }

.radio-group { display: flex; flex-wrap: wrap; gap: 0.4em 1.4em; }
.radio-label {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4em;
  font-weight: 500 !important;
  margin-bottom: 0 !important;
}
.radio-label input { width: auto; accent-color: var(--night); }

.form-group--honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status { min-height: 1.6em; margin: 0 0 1em; font-size: 0.95em; }
.form-status--success { color: var(--night); font-weight: 700; }
.form-status--error { color: #a33b3b; font-weight: 700; }

.contact-form .btn {
  width: 100%;
  border: none;
  cursor: pointer;
  font-size: 1.05rem;
}

.form-fallback { margin-top: 2em; font-size: 0.85em; }

@media (max-width: 479px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- フッター ---------- */

.footer {
  padding: 2rem 1.25rem 2.5rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #c4cad8;
  background: var(--night);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* ---------- 広い画面 ---------- */

@media (min-width: 480px) {
  body { font-size: 17px; }
  .section { padding-block: 5rem; }
  .contact-form { padding: 2.2em 2em; }
}

@media (min-width: 768px) {
  .profile { flex-direction: row; align-items: flex-start; gap: 2.8rem; }
  .profile__photo { width: 240px; flex-shrink: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}


/* ==========================================================================
   C2 で追加した部品
   ========================================================================== */

/* ---------- 上部バー ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1.25rem;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(39, 52, 82, 0.08);
}
.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  letter-spacing: 0.04em;
}
.topbar__mark { width: 1.6rem; height: 1.6rem; border-radius: 50%; flex-shrink: 0; }
.topbar__cta {
  flex-shrink: 0;
  padding: 0.45em 1.1em;
  border-radius: 999px;
  background: var(--sun);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}
.topbar__cta:hover { background: #ffc933; }

/* ---------- 写真 ---------- */

.photo { margin: 2.2em 0 0; }
.photo:not(:last-child) { margin-bottom: 2.2em; }
.photo img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 20px;
  background: var(--mist);
}
.photo--short img { aspect-ratio: 16 / 9; object-position: 50% 40%; }
.photo--tall img { aspect-ratio: 4 / 3; object-position: 50% 62%; }
.photo--frame img { aspect-ratio: 4 / 3; border-radius: 28px; }

/* スマホでは「wide」を画面の端まで広げる */
@media (max-width: 767px) {
  .photo--wide { margin-inline: -1.25rem; }
  .photo--wide img { border-radius: 0; }
  .photo--frame img { border-radius: 0; }
  /* セクション末尾の写真は、次の色面まで下端を伸ばす（色の細い帯を残さない） */
  .section__inner > .photo--wide:last-child { margin-bottom: -3.75rem; }
}
@media (min-width: 480px) and (max-width: 767px) {
  .section__inner > .photo--wide:last-child { margin-bottom: -5rem; }
}

/* 広い画面では「wide」を本文の幅より少し広げる */
@media (min-width: 768px) {
  .photo--wide { margin-inline: calc(50% - min(50vw - 2rem, 28rem)); }
  .photo--inset { max-width: 30rem; }
}

/* ---------- 段階の図（夜 → 明け方 → 朝） ---------- */

.stage-figure { margin: 2em 0 0; }
.stage-figure svg { display: block; width: 100%; height: auto; }

/* ---------- お問い合わせ上の写真の帯 ---------- */

.section--contact { padding-top: 0; }
.contact-band {
  position: relative;
  height: 13rem;
  margin-bottom: 2.5rem;
  overflow: hidden;
}
.contact-band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 40% 55%;
}
.contact-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(39, 52, 82, 0) 35%, var(--night) 100%);
}

/* ---------- 広い画面のヒーロー（左に文字・右に写真） ---------- */

@media (min-width: 1100px) {
  .topbar { padding-inline: 2rem; }
  .hero {
    min-height: 38rem;
    padding: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
  }
  .hero__inner { width: 100%; padding: 5rem 2rem; }
  .hero__title { max-width: 11em; }
  .hero__subtitle, .hero__label, .hero__facts, .hero__cta-note { max-width: 30rem; }
  .hero__img {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    aspect-ratio: auto;
    margin: 0;
    object-position: 50% 60%;
    -webkit-mask-image: linear-gradient(to right, transparent 0, rgba(0,0,0,.6) 22%, #000 45%);
    mask-image: linear-gradient(to right, transparent 0, rgba(0,0,0,.6) 22%, #000 45%);
  }
  .contact-band { height: 20rem; }
}


/* ==========================================================================
   D1/D2 で追加した部品（docs/2026-09-25_MEGAJUN比較分析.md §4）
   ========================================================================== */

/* ---------- 目次タブ（スマホ＝屋号とボタンの下に横スクロールの行・PC＝同じ1行） ---------- */

.topbar { flex-wrap: wrap; row-gap: 0.45rem; padding-bottom: 0.5rem; }
.tabs {
  order: 3;
  flex: 1 0 100%;
  display: flex;
  gap: 0.4rem;
  margin: 0 -1.25rem;
  padding: 0 1.25rem 0.1rem;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs li { flex-shrink: 0; }
.tabs a {
  display: block;
  padding: 0.3em 0.95em;
  border-radius: 999px;
  background: var(--mist);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.tabs a:hover { background: var(--sky); }

section[id] { scroll-margin-top: 6.5rem; }

@media (min-width: 900px) {
  .topbar { flex-wrap: nowrap; padding-bottom: 0.6rem; }
  .tabs { order: 0; flex: 0 1 auto; margin: 0 0 0 auto; padding: 0; overflow: visible; }
  .tabs a { background: transparent; font-size: 0.88rem; }
  .tabs a:hover { background: var(--mist); }
  section[id] { scroll-margin-top: 4.5rem; }
}

/* ---------- ファーストビュー：ラベル・事実チップ・ボタン下の一言 ---------- */

.hero__label {
  display: inline-block;
  margin: 0 0 0.9em;
  padding: 0.2em 0.9em;
  border-radius: 999px;
  background: var(--white);
  color: var(--night);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.7;
}

.hero__facts {
  list-style: none;
  margin: 0 0 1.5em;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.hero__facts li {
  padding: 0.2em 0.85em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(39, 52, 82, 0.12);
  color: var(--soft);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.7;
}

.hero__cta-note {
  margin: 0.8em 0 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--soft);
}

/* ---------- こんなお子さん・ご家庭に ---------- */

.check-list {
  list-style: none;
  margin: 0 0 1.6em;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}
.check-list li {
  position: relative;
  padding: 0.75em 1em 0.75em 2.6em;
  background: var(--mist);
  border-radius: 16px;
  font-weight: 700;
  line-height: 1.7;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 1em;
  top: 1.2em;
  width: 0.8em;
  height: 0.8em;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 3px var(--sun-soft);
}

/* ---------- 僕の話の締め ---------- */

.story-close {
  margin-top: 2em;
  padding-left: 1.1em;
  border-left: 4px solid var(--sun);
  font-weight: 700;
}

/* ---------- 繰り返すボタン ---------- */

.cta-block { margin: 2.2em 0 0; text-align: center; }
.cta-block:not(:last-child) { margin-bottom: 2.2em; }

/* ---------- やること／やらないこと ---------- */

.do-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}
.do-card {
  padding: 1.3em 1.4em 1.4em;
  background: var(--white);
  border-radius: 20px;
}
.do-card--not { background: rgba(255, 255, 255, 0.55); }
.do-card__title {
  font-size: 1.1rem;
  margin: 0 0 0.6em;
}
.do-card ul { margin: 0; padding-left: 1.2em; }
.do-card li { margin-bottom: 0.5em; }
.do-card li:last-child { margin-bottom: 0; }
.do-card li::marker { color: var(--night); }
.do-card--not li::marker { content: "× "; color: #a33b3b; font-weight: 700; }

@media (min-width: 640px) {
  .do-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- はじめ方（3ステップ） ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 1.4em 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 1.1em 1.2em 1.1em 4em;
  background: var(--white);
  border-radius: 18px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1em;
  top: 1em;
  width: 2.1em;
  height: 2.1em;
  border-radius: 50%;
  background: var(--sun);
  color: var(--ink);
  font-weight: 700;
  line-height: 2.1em;
  text-align: center;
}
.steps p { margin: 0; line-height: 1.75; }
.steps__title { font-weight: 700; }
.steps__free {
  display: inline-block;
  margin-left: 0.5em;
  padding: 0 0.6em;
  border-radius: 999px;
  background: var(--leaf);
  font-size: 0.75em;
  vertical-align: 0.1em;
}

/* ---------- よくある質問 ---------- */

.section h2.faq-heading { margin-top: 2.4em; }
.faq { display: grid; gap: 0.75rem; }
.faq__item {
  padding: 1.1em 1.3em 1.2em;
  background: var(--white);
  border-radius: 18px;
}
.faq__q {
  position: relative;
  margin: 0 0 0.5em;
  padding-left: 1.7em;
  font-size: 1.02rem;
}
.faq__q::before {
  content: "Q";
  position: absolute;
  left: 0;
  color: var(--dawn);
}
.faq__a { font-size: 0.95em; }
.faq__a p { margin-bottom: 0.8em; }
.faq__a p:last-child { margin-bottom: 0; }

/* ---------- フォームの前置き ---------- */

.form-intro {
  max-width: 32em;
  margin: 0 auto 1.6em;
  font-weight: 700;
  line-height: 1.85;
}
.form-intro p { margin-bottom: 0.7em; }
.form-intro p:last-child { margin-bottom: 0; color: var(--sun); }
.form-intro__ex { font-size: 0.88em; color: #c4cad8; font-weight: 500; }

/* 9/28: 締めの一文を見出し直下へ移動したので余白を上下入れ替え */
h2 + .story-close { margin-top: 0; margin-bottom: 2em; }

/* 9/28: 「とは」と「こんなお子さん」の間の空きを詰める */
#about { padding-bottom: 1.5rem; }
#about + #for { padding-top: 1.5rem; }

/* 9/28: 申込ボタンは森の写真を飛ばして見出しへ直接着地させる */
#h-contact { scroll-margin-top: 7.5rem; }
@media (min-width: 900px) { #h-contact { scroll-margin-top: 5.5rem; } }

/* 9/28夜 みどりさんFB: ファーストビューで「誰が・今なにをしている人か」を見せる */
.hero__person { display: flex; align-items: center; gap: 0.9rem; margin: 0 0 1.4em; max-width: 30rem; }
.hero__person-photo { width: 64px; height: 64px; flex-shrink: 0; border-radius: 50%; object-fit: cover; object-position: 50% 14%; border: 3px solid var(--sun); background: var(--white); }
.hero__person-name { margin: 0; font-weight: 700; font-size: 1rem; color: var(--ink); }
.hero__person-role { margin: 0.1em 0 0; font-size: 0.85rem; font-weight: 700; color: var(--soft); line-height: 1.6; }
.story-heading { margin: 2.4em 0 0.8em; font-size: 1.2rem; }
#story .profile { margin-bottom: 0.5rem; }

/* 9/28夜: タブに「よくある質問」を追加 */
#h-faq { scroll-margin-top: 7.5rem; }
@media (min-width: 900px) { #h-faq { scroll-margin-top: 5.5rem; } }
.tabs a { white-space: nowrap; }

/* 9/28夜 独立レビュー指摘への対応 */
.nowrap { white-space: nowrap; }
.do-grid { align-items: start; }
@media (max-width: 480px) {
  #h-faq, #h-contact { scroll-margin-top: 9rem; }
}
@media (max-width: 374px) {
  .hero__label { font-size: 0.78rem; }
}
