/*
 * school.sptr.jp トップページ
 * デザイン：キャンバス「スパトレ 学校向けサイト」（Main / Mobile / Components）
 * 設計書パッチ 001（訴求軸と写真仕様）準拠
 */

:root {
  --brand-primary: #7521da;
  --brand-primary-hover: #5a17ab;
  --brand-accent: #ff5a5e;
  --brand-success: #00e590;
  --ink: #17141c;
  --text: #45404f;
  --muted: #6b6478;
  --note: #7b7290;
  --surface: #faf9fb;
  --border: #ebe8f0;
  --lilac: #f6f2fc;
  --lilac-border: #e5dff0;
  --lilac-deep: #ede4fa;
  --on-primary-muted: #e2d6f5;
  --placeholder: #e6e1ec;
  --ok: #159c68;
  --ng: #c9433f;

  --font-body: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-display: "Zen Kaku Gothic New", "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;

  --gutter: 56px;
  --section-y: 88px;
  --header-h: 76px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink);
  background: #ffffff;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
}

a:hover {
  color: var(--brand-primary-hover);
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--section-y) 0;
}

.section.is-surface {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.section.is-lilac {
  background: var(--lilac);
  border-top: 1px solid var(--lilac-border);
}

/* ---------- 見出し ---------- */

.eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.5;
  color: var(--brand-primary);
}

.section-title {
  margin-top: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  line-height: 1.5;
}

.section-lead {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
}

.note {
  font-size: 12px;
  line-height: 1.9;
  color: var(--note);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 30px;
  border: 1.5px solid transparent;
  border-radius: 3px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primary {
  background: var(--brand-primary);
  color: #ffffff;
  box-shadow: 0 2px 0 var(--brand-primary-hover);
}

.btn-primary:hover {
  background: var(--brand-primary-hover);
  color: #ffffff;
  box-shadow: 0 2px 0 #45148a;
}

.btn-secondary {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--lilac-deep);
}

.btn-secondary:hover {
  background: #e4d4f8;
  border-color: var(--brand-primary-hover);
  color: var(--brand-primary-hover);
}

.btn-ink {
  border-color: var(--ink);
  color: var(--ink);
  background: #ffffff;
}

.btn-ink:hover {
  background: var(--surface);
  color: var(--ink);
}

.btn-small {
  min-height: 44px;
  padding: 0 20px;
  font-size: 14px;
}

.btn-lg {
  min-height: 58px;
}

.text-link {
  font-size: 14px;
  font-weight: 700;
}

/* ---------- 写真プレースホルダ（設計書パッチ 6.5.5） ---------- */

.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--placeholder);
  color: var(--note);
  font-size: 12px;
  line-height: 1.9;
  text-align: center;
}

.ph-id {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #574f6b;
}

.ph-status {
  display: block;
  color: var(--ok);
}

.ph-status.is-missing {
  color: var(--ng);
}

.ratio-4x3 {
  aspect-ratio: 4 / 3;
}

.ratio-3x2 {
  aspect-ratio: 3 / 2;
}

.ratio-1x1 {
  aspect-ratio: 1 / 1;
}

.fig-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- ヘッダー ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 1;
  min-width: 0;
  line-height: 0;
}

.logo:hover {
  color: var(--ink);
}

.logo img {
  width: 280px;
  height: auto;
}

.global-nav ul {
  display: flex;
  align-items: center;
  gap: 32px;
}

.global-nav a {
  display: block;
  padding: 12px 0; /* クリック領域を 44px 以上にする */
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.global-nav a:hover {
  color: var(--brand-primary);
}

.global-nav .nav-actions .btn {
  display: inline-flex;
  width: 100%;
  padding: 0 30px;
  font-size: 16px;
}

.global-nav .btn-primary,
.global-nav .btn-primary:hover {
  color: #ffffff;
}

.global-nav .btn-secondary {
  color: var(--brand-primary);
}

.global-nav .btn-secondary:hover {
  color: var(--brand-primary-hover);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle span + span {
  margin-top: 5px;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 1. ヒーロー（案B：教科書 → 会話） ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: #ffffff;
}

.hero-inner {
  display: grid;
  /* 1440px で 700 : 740。狭い画面でも左の見出し列を確保する */
  grid-template-columns: minmax(0, 700fr) minmax(0, 740fr);
  max-width: 1440px;
  min-height: 720px;
  margin: 0 auto;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 24px 56px var(--gutter);
}

.badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1.5px solid var(--brand-primary);
  color: var(--brand-primary);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.hero-title {
  margin-top: 30px;
  font-family: var(--font-display);
  font-weight: 900;
  /* 1行が左列（画面幅の約 48.6% − 左右余白 80px）に収まる大きさ */
  font-size: clamp(32px, calc(4.6vw - 8px), 60px);
  line-height: 1.28;
}

.hero-title .is-before {
  color: #b8b2c4;
}

.hero-title .is-after {
  background: linear-gradient(
    transparent 60%,
    rgba(0, 229, 144, 0.42) 60%,
    rgba(0, 229, 144, 0.42) 93%,
    transparent 93%
  );
}

.hero-title .line {
  display: block;
  white-space: nowrap;
}

.hero-lead {
  margin-top: 24px;
  font-size: 18px;
  line-height: 1.9;
  color: var(--text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
}

/* 右側の薄紫の面：ヒーロー右端から 700px */
.hero-visual::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 5.41%;
  /* 1440px を超える画面では画面右端まで伸ばす */
  right: min(0px, calc((1440px - 100vw) / 2));
  background: var(--lilac);
}

/* 740 × 720 の構図を比率で保ったまま縮める */
.hero-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 740 / 720;
  container-type: inline-size;
}

.hero-stage > * {
  position: absolute;
  font-size: 2.162cqw; /* 740px 幅で 16px */
}

.stage-circle {
  left: 25.95%;
  top: 12.78%;
  width: 51.35%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--lilac-deep);
}

.stage-textbook {
  left: 8.11%;
  top: 14.44%;
  width: 40.54%;
  padding: 1.625em 1.5em;
  background: #ffffff;
  box-shadow: 0 1.125em 2.5em rgba(23, 20, 28, 0.14);
  transform: rotate(-4deg);
}

.textbook-unit {
  font-size: 0.6875em;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.5;
  color: var(--brand-primary);
}

.textbook-title {
  margin-top: 0.42em;
  font-size: 1.1875em;
  font-weight: 700;
  line-height: 1.5;
}

.textbook-lines {
  display: flex;
  flex-direction: column;
  gap: 0.6875em;
  margin-top: 1.25em;
}

.textbook-lines span {
  display: block;
  height: 0.4375em;
  background: var(--border);
}

.textbook-lines span:nth-child(3) {
  width: 74%;
}

.textbook-lines span:nth-child(5) {
  width: 56%;
}

.textbook-example {
  margin-top: 1.375em;
  padding: 0.75em 0.875em;
  background: #f4eefc;
  font-size: 0.8125em;
  line-height: 1.7;
  color: var(--text);
}

.textbook-example strong {
  font-weight: 700;
  color: var(--brand-primary);
}

.stage-arrow {
  left: 45.41%;
  top: 41.67%;
  width: 9.73%;
  transform: rotate(12deg);
}

.stage-arrow svg {
  width: 100%;
  height: auto;
}

.stage-photo {
  right: 7.57%;
  top: 23.89%;
  width: 51.35%;
  aspect-ratio: 4 / 3;
  box-shadow: 0 1.375em 3.125em rgba(23, 20, 28, 0.18);
  transform: rotate(3deg);
  overflow: hidden;
}

.stage-photo .ph {
  width: 100%;
  height: 100%;
  font-size: 0.75em;
}

.stage-photo .ph-id {
  font-size: 1.1667em;
}

.bubble {
  padding: 1.125em 1.5em;
  font-size: 1em;
  line-height: 1.4;
  white-space: nowrap;
}

.bubble-student {
  left: 12.97%;
  bottom: 17.78%;
  background: var(--ink);
  color: #ffffff;
  font-weight: 500;
  border-radius: 1.625em 1.625em 1.625em 0.25em;
  box-shadow: 0 0.875em 2.125em rgba(23, 20, 28, 0.24);
}

.bubble-trainer {
  right: 12.97%;
  bottom: 10.28%;
  padding: 1em 1.375em;
  background: var(--brand-success);
  color: #0b3b28;
  font-size: 0.9375em;
  font-weight: 700;
  border-radius: 1.733em 1.733em 0.267em 1.733em;
  box-shadow: 0 0.8em 2em rgba(0, 229, 144, 0.32);
}

/* モバイル用のヒーロー写真＋数値カード（Mobile アートボード） */
.hero-mobile {
  display: none;
}

/* ---------- 2. 実績数値バー ---------- */

.stats {
  background: var(--lilac);
  border-top: 1px solid var(--lilac-border);
  border-bottom: 1px solid var(--lilac-border);
}

.stats-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 1440px;
  margin: 0 auto;
}

.stats-item {
  padding: 34px 40px;
  border-right: 1px solid var(--lilac-border);
}

.stats-item:last-child {
  border-right: 0;
}

.stats-value {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 40px;
  line-height: 1;
  color: var(--brand-primary);
  white-space: nowrap;
}

.stats-value small {
  margin-left: 4px;
  font-size: 20px;
}

.stats-label {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- 3. 課題提起 ---------- */

.issue-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
  margin-top: 44px;
}

.issue-item {
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--brand-primary);
}

.issue-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.7;
}

.issue-text {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
}

/* ---------- 4. 受講後アンケート ---------- */

.outcome-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.metric-group {
  margin-top: 48px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.metric-group + .metric-list + .metric-group {
  margin-top: 40px;
}

.metric-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.metric-list.is-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric {
  padding: 30px 26px;
  background: #ffffff;
  border: 1px solid var(--border);
}

.metric-value {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 46px;
  line-height: 1;
  color: var(--brand-primary);
}

.metric-value small {
  font-size: 22px;
}

.metric-value.is-muted {
  color: var(--muted);
}

.metric-text {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.85;
}

.metric-list.is-teacher .metric {
  padding: 26px;
}

.metric-list.is-teacher .metric-value {
  font-size: 36px;
  color: var(--ink);
}

.metric-list.is-teacher .metric-value small {
  font-size: 18px;
}

.metric-list.is-teacher .metric-text {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text);
}

.outcome .note {
  margin-top: 26px;
}

/* ---------- 4b. 全国調査との並置 ---------- */

.context-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.context-item {
  padding: 40px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.context-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.context-value {
  display: inline-block;
  margin-top: 20px;
  padding: 14px 24px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 34px;
  line-height: 1;
  background: var(--brand-primary);
  color: #ffffff;
}

.context-text {
  margin-top: 20px;
  font-size: 15px;
  line-height: 1.9;
}

.context-item .note {
  margin-top: 16px;
}

/* 当社値を主役にし、全国値は比較用に小さく控えめに置く */
.context-list {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: end;
}

.context-item.is-ours {
  padding: 48px;
  border-color: var(--brand-primary);
  background: var(--brand-primary);
  color: #ffffff;
}

.context-item.is-ours .context-label,
.context-item.is-ours .note {
  color: rgba(255, 255, 255, 0.8);
}

.context-item.is-ours .context-value {
  padding: 0;
  font-size: 120px;
  background: transparent;
  color: #ffffff;
}

.context-item.is-ours .context-text {
  font-size: 17px;
  font-weight: 700;
}

.context-item.is-national .context-value {
  padding: 0;
  font-size: 40px;
  background: transparent;
  color: var(--muted);
}

.context-item.is-national .context-text {
  font-size: 13px;
  color: var(--muted);
}

.context-value small {
  margin-left: 4px;
  font-size: 0.4em;
}

/* ---------- 5. 生徒の声 ---------- */

.voice-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 44px;
}

.voice-item {
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(23, 20, 28, 0.08);
}

.voice-text {
  padding: 28px 26px;
  font-size: 15px;
  line-height: 2;
}

.voices .note {
  margin-top: 26px;
}

/* ---------- CTAブロック ---------- */

.cta {
  padding: 72px 0;
  background: var(--brand-primary);
  color: #ffffff;
}

.cta-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cta-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.5;
}

.cta-text {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--on-primary-muted);
}

.cta-actions {
  display: flex;
  flex-shrink: 0;
  gap: 14px;
}

.cta .btn {
  padding: 0 28px;
  font-size: 15px;
}

.btn-on-primary {
  background: #ffffff;
  color: var(--brand-primary);
  box-shadow: 0 2px 0 rgba(23, 20, 28, 0.18);
}

.btn-on-primary:hover {
  background: var(--lilac);
  color: var(--brand-primary-hover);
}

/* 紫帯の副ボタン。白抜きだとボタンに見えないため、薄紫で塗る */
.btn-outline-light {
  background: var(--lilac-deep);
  color: var(--brand-primary);
  box-shadow: 0 2px 0 rgba(23, 20, 28, 0.18);
}

.btn-outline-light:hover {
  background: #ffffff;
  color: var(--brand-primary-hover);
}

.cta-contact {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 14px;
  color: var(--on-primary-muted);
}

.cta-contact a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 6b. 教科書準拠 ---------- */

.textbook-grid {
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

.textbook-grid .section-title {
  line-height: 1.45;
}

.textbook-body {
  margin-top: 22px;
  font-size: 16px;
  line-height: 2.05;
  color: var(--text);
}

.textbook-figures {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  margin-top: 32px;
}

.figure-value {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 34px;
  line-height: 1;
  color: var(--brand-primary);
}

.figure-value small {
  font-size: 16px;
}

.figure-label {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.step {
  display: flex;
  gap: 22px;
  align-items: flex-start;
}

.step-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 48px;
  flex-shrink: 0;
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--brand-primary);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 17px;
  color: var(--brand-primary);
}

.step:last-child .step-num {
  background: var(--brand-primary);
  color: #ffffff;
}

.step-marker::after {
  content: "";
  width: 2px;
  height: 56px;
  background: #e5e0ed;
}

.step:last-child .step-marker::after {
  display: none;
}

.step-body {
  padding-top: 6px;
}

.step-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.6;
}

.step-text {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.95;
  color: var(--muted);
}

/* ---------- 7. サービス ---------- */

.service-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 44px;
}

.service-item {
  border: 1px solid var(--border);
}

.service-photo {
  height: 190px;
}

.service-photo .ph {
  height: 100%;
  background: #f2eff6;
}

.service-body {
  padding: 28px 26px;
}

.service-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.6;
}

.service-text {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.95;
  color: var(--muted);
}

.service-record {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--text);
}

.service-record strong {
  color: var(--brand-primary);
}

/* ---------- 8. 港区モデル ---------- */

.case {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.case-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  max-width: 1440px;
  margin: 0 auto;
}

.case-body {
  padding: var(--section-y) var(--gutter);
}

.case-body .section-title {
  font-size: 34px;
}

.case-text {
  margin-top: 20px;
  font-size: 15px;
  line-height: 2;
  color: var(--text);
}

/* 港区事例は写真を使わず、学習の流れと学年別の目標を図で示す */
.case-model {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
  padding: var(--section-y) var(--gutter);
  background: var(--lilac);
}

.case-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.case-step {
  position: relative;
  padding: 22px 18px;
  background: #ffffff;
  border: 1px solid var(--lilac-border);
  text-align: center;
}

.case-step + .case-step::before {
  content: "→";
  position: absolute;
  top: 50%;
  left: -22px;
  transform: translateY(-50%);
  font-weight: 700;
  color: var(--brand-primary);
}

.case-step-num {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  color: var(--brand-primary);
}

.case-step-title {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--ink);
}

.case-step-text {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

.case-goals {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.case-goal {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding: 14px 18px;
  background: #ffffff;
  border: 1px solid var(--lilac-border);
}

.case-goal dt {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--brand-primary);
}

.case-goal dd {
  margin: 0;
  font-size: 15px;
  color: var(--text);
}

.ratio-4x3 > .fig-image,
.stage-photo > .fig-image {
  display: block;
}

.ph-memo {
  display: block;
  max-width: 300px;
  margin: 10px auto 0;
}

/* ---------- 9. なぜスパトレか ---------- */

.why-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: 44px;
}

.why-item::before {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  background: var(--brand-primary);
}

.why-title {
  margin-top: 20px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.6;
}

.why-text {
  margin-top: 14px;
  font-size: 15px;
  line-height: 2;
  color: var(--muted);
}

/* ---------- 10. 導入自治体・学校 ---------- */

.client-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.client-item {
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.8;
}

.client-name {
  display: block;
  font-weight: 700;
}

.client-scale {
  display: block;
  color: var(--muted);
}

.clients .note {
  margin-top: 22px;
}

/* ---------- 11. 先生の声 ---------- */

.teacher-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 44px;
}

.teacher-item {
  display: flex;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--border);
}

.teacher-quote {
  font-size: 16px;
  line-height: 2;
}

.teacher-role {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- 12. 導入までの流れ ---------- */

.flow-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 44px;
  counter-reset: flow;
}

.flow-item {
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--border);
}

.flow-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 28px;
  line-height: 1.4;
  color: #d9d3e2;
}

.flow-title {
  margin-top: 12px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
}

.flow-text {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
}

.support {
  margin-top: 32px;
  padding: 36px 40px;
  background: #ffffff;
  border: 1px solid var(--border);
}

.support-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.6;
}

.support-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin-top: 24px;
}

.support-item {
  display: flex;
  gap: 14px;
}

.support-item svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.support-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
}

.support-text {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}

.flow-figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.flow-figure {
  background: var(--lilac);
  border: 1px solid var(--border);
}

.flow-figure img {
  width: 100%;
  height: 220px;
  padding: 16px 0;
  object-fit: contain;
}

.flow-figure figcaption {
  padding: 12px 18px;
  background: #ffffff;
  border-top: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

/* ---------- お問い合わせフォーム ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

.contact-lead {
  margin-top: 22px;
  font-size: 16px;
  line-height: 2;
  color: var(--text);
}

.contact-direct {
  margin-top: 28px;
  padding: 20px 24px;
  background: var(--surface);
  border-left: 3px solid var(--brand-primary);
  font-size: 14px;
  line-height: 2;
  color: var(--text);
}

.contact-form {
  padding: 40px;
  background: #ffffff;
  border: 1px solid var(--border);
}

fieldset.form-row {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.form-row + .form-row {
  margin-top: 22px;
}

.form-label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
}

.form-label .req {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ng);
}

.form-label .opt {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.form-hint {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--note);
}

.form-control {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  padding: 10px 14px;
  border: 1px solid #cfc9d8;
  border-radius: 3px;
  background: #ffffff;
  font: inherit;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
}

.form-control:focus {
  border-color: var(--brand-primary);
  outline: 2px solid rgba(117, 33, 218, 0.25);
  outline-offset: 0;
}

textarea.form-control {
  resize: vertical;
}

.form-types {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  padding: 0;
  border: 0;
}

.form-types legend {
  padding: 0;
}

.type-option {
  position: relative;
}

.type-option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.type-option span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid #cfc9d8;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.type-option input:checked + span {
  border-color: var(--brand-primary);
  background: var(--lilac);
  color: var(--brand-primary);
}

.type-option input:focus-visible + span {
  outline: 3px solid var(--brand-primary);
  outline-offset: 2px;
}

.form-agree {
  margin-top: 26px;
}

.agree-option {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  cursor: pointer;
}

.agree-option input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--brand-primary);
}

.agree-option a {
  color: var(--brand-primary);
  text-decoration: underline;
}

.agree-option .req {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ng);
}

.form-captcha {
  margin-top: 26px;
}

.form-submit {
  width: 100%;
  margin-top: 26px;
}

.form-submit:disabled {
  background: #8a8a8a;
  cursor: default;
}

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

.site-footer {
  padding: 56px 0 40px;
  border-top: 1px solid var(--border);
  background: #ffffff;
  color: var(--muted);
  font-size: 14px;
}

.footer-main {
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

.site-footer .logo img {
  width: 240px;
}

.footer-company {
  margin-top: 20px;
  line-height: 2;
}

.footer-company a {
  color: var(--muted);
}

.footer-nav {
  display: flex;
  gap: 64px;
  line-height: 2.2;
}

.footer-nav-title {
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--ink);
}

.footer-nav a {
  color: var(--muted);
}

.footer-nav a:hover {
  color: var(--brand-primary);
}

.footer-bottom small {
  font-size: inherit;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: #9c94ac;
}

/* モバイルの固定CTAバー */
.fixed-cta {
  display: none;
}

/* =========================================================
   タブレット
   ========================================================= */

/* ---------- 送信完了モーダル ---------- */

.modal {
  width: min(480px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  box-shadow: 0 24px 60px rgba(23, 20, 28, 0.25);
}

/* <dialog> 非対応のブラウザでは閉じた状態でも表示されてしまうので明示的に隠す */
.modal:not([open]) {
  display: none;
}

.modal::backdrop {
  background: rgba(23, 20, 28, 0.55);
}

.modal-body {
  padding: 40px 32px 32px;
  text-align: center;
}

.modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--lilac-deep);
  color: var(--brand-primary);
  font-size: 28px;
  font-weight: 700;
}

.modal-title {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.modal-text {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.9;
}

.modal-close {
  margin-top: 28px;
  min-width: 160px;
}

@media (max-width: 1280px) {
  :root {
    --gutter: 40px;
  }

  .issue-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stats-item {
    padding: 30px 28px;
  }

  .stats-value {
    font-size: 34px;
  }

  .metric-value {
    font-size: 40px;
  }

  .cta-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-actions {
    flex-wrap: wrap;
  }
}

/* ヘッダーの全項目が1行に収まらない幅ではハンバーガーメニューにする */
@media (max-width: 1280px) {
  :root {
    --header-h: 68px;
  }

  .nav-toggle {
    display: block;
  }

  .global-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px var(--gutter) 40px;
    background: #ffffff;
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s, visibility 0.2s;
  }

  .global-nav.is-open {
    visibility: visible;
    opacity: 1;
  }

  .global-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .global-nav li {
    border-bottom: 1px solid var(--border);
  }

  .global-nav a {
    display: block;
    padding: 16px 0;
    font-size: 16px;
  }

  .header-actions {
    margin-left: auto;
  }
}

@media (max-width: 1080px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .hero-copy {
    padding: 56px var(--gutter) 40px;
  }

  .hero-visual {
    padding: 0 var(--gutter);
  }

  .hero-visual::before {
    left: 0;
    right: 0;
    top: 12%;
  }

  .hero-stage {
    max-width: 740px;
    margin: 0 auto;
  }

  .stats-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-item:nth-child(2) {
    border-right: 0;
  }

  .stats-item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--lilac-border);
  }

  .metric-list,
  .metric-list.is-five {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .voice-list,
  .service-list,
  .why-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .textbook-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .case-grid {
    grid-template-columns: minmax(0, 1fr);
  }


  .client-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .teacher-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .flow-list,
  .support-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-main {
    flex-direction: column;
  }
}

/* =========================================================
   モバイル（Mobile アートボード 390）
   ========================================================= */

@media (max-width: 767.98px) {
  :root {
    --gutter: 20px;
    --section-y: 44px;
    --header-h: 60px;
  }

  body {
    padding-bottom: 60px; /* 固定CTAバーの分 */
  }

  .logo img {
    width: 210px;
  }

  .header-actions {
    display: none;
  }

  .nav-toggle {
    margin-left: auto;
  }

  .global-nav .nav-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
  }

  .eyebrow {
    font-size: 11px;
    letter-spacing: 0.16em;
  }

  .section-title {
    margin-top: 12px;
    font-size: 25px;
    line-height: 1.55;
  }

  .section-lead {
    margin-top: 12px;
    font-size: 13px;
  }

  .note {
    font-size: 11px;
  }

  /* ヒーロー */
  .hero-copy {
    padding: 32px var(--gutter) 0;
  }

  .badge {
    gap: 7px;
    padding: 8px 14px;
    font-size: 12px;
  }

  .hero-title {
    margin-top: 22px;
    font-size: min(36px, 8.4vw);
    line-height: 1.32;
  }

  .hero-lead {
    margin-top: 20px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.95;
  }

  .hero-actions {
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
  }

  .hero-actions .btn {
    width: 100%;
    min-height: 52px;
    font-size: 15px;
  }

  .hero-visual {
    display: none;
  }

  .hero-mobile {
    display: block;
    position: relative;
    margin-top: 28px;
    padding-bottom: 32px;
  }

  .hero-mobile-photo {
    height: 280px;
  }

  .hero-mobile-photo .ph {
    height: 100%;
    font-size: 11px;
  }

  .hero-mobile-photo .ph-id {
    font-size: 13px;
  }

  .hero-mobile-card {
    position: relative;
    margin: -44px 20px 0;
    padding: 22px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(23, 20, 28, 0.16);
  }

  .hero-mobile-card .metric-value {
    font-size: 36px;
  }

  .hero-mobile-card .metric-value small {
    font-size: 17px;
  }

  .hero-mobile-card .metric-text {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text);
  }

  .hero-mobile-card .note {
    margin-top: 6px;
  }

  /* 数値バー */
  .stats-item {
    padding: 22px 20px;
  }

  .stats-value {
    font-size: 30px;
  }

  .stats-value small {
    margin-left: 2px;
    font-size: 15px;
  }

  .stats-label {
    margin-top: 8px;
    font-size: 12px;
  }

  /* 課題提起 */
  .issue-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-top: 26px;
  }

  .issue-item {
    padding: 20px;
    border-top: 1px solid var(--border);
    border-left: 3px solid var(--brand-primary);
  }

  .issue-title br {
    display: none;
  }

  .issue-text {
    margin-top: 8px;
  }

  /* アンケート */
  .metric-group {
    margin-top: 24px;
  }

  .metric-group + .metric-list + .metric-group {
    margin-top: 28px;
  }

  .metric-list {
    gap: 12px;
  }

  .metric,
  .metric-list.is-teacher .metric {
    padding: 20px;
  }

  .metric-value {
    font-size: 32px;
  }

  .metric-value small {
    font-size: 16px;
  }

  .metric-list.is-teacher .metric-value {
    font-size: 28px;
  }

  .metric-list.is-teacher .metric-value small {
    font-size: 14px;
  }

  .metric-text {
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.8;
  }

  .metric-text br {
    display: none;
  }

  .outcome .note {
    margin-top: 18px;
  }

  /* 全国調査 */
  .context-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin-top: 24px;
  }

  .context-item {
    padding: 24px;
  }

  .context-label {
    font-size: 12px;
  }

  .context-value {
    margin-top: 14px;
    padding: 10px 18px;
    font-size: 26px;
  }

  .context-item.is-ours {
    padding: 28px 24px;
  }

  .context-item.is-ours .context-value {
    font-size: 80px;
  }

  .context-item.is-ours .context-text {
    font-size: 15px;
  }

  .context-item.is-national .context-value {
    font-size: 30px;
  }

  .context-text {
    margin-top: 14px;
    font-size: 14px;
  }

  /* 生徒の声 */
  .voice-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-top: 26px;
  }

  .voice-text {
    padding: 22px;
  }

  /* CTA */
  .cta {
    padding: 40px 0;
  }

  .cta-main {
    gap: 22px;
  }

  .cta-title {
    font-size: 23px;
    line-height: 1.55;
  }

  .cta-text {
    margin-top: 12px;
    font-size: 14px;
  }

  .cta-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .cta .btn {
    width: 100%;
    min-height: 52px;
  }

  .cta-contact {
    margin-top: 24px;
    padding-top: 18px;
    font-size: 13px;
    line-height: 1.9;
  }

  .cta-contact .sep {
    display: none;
  }

  .cta-contact .contact-mail {
    display: block;
  }

  /* 教科書準拠 */
  .textbook-grid {
    gap: 32px;
  }

  .textbook-body {
    margin-top: 16px;
    font-size: 15px;
    line-height: 2;
  }

  .figure-value {
    font-size: 28px;
  }

  .step {
    gap: 16px;
  }

  .step-marker,
  .step-num {
    width: 40px;
  }

  .step-num {
    height: 40px;
    font-size: 15px;
  }

  .step-marker::after {
    height: 40px;
  }

  .step-body {
    padding-top: 2px;
  }

  .step-title {
    font-size: 17px;
  }

  .step-text {
    font-size: 14px;
  }

  /* サービス・なぜ・導入先 */
  .service-list,
  .why-list,
  .client-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-top: 26px;
  }

  .service-photo {
    height: auto;
    aspect-ratio: 3 / 2;
  }

  .service-body {
    padding: 22px;
  }

  .service-title {
    font-size: 17px;
  }

  .why-list {
    gap: 28px;
  }

  .why-title {
    margin-top: 14px;
    font-size: 18px;
  }

  .why-text {
    margin-top: 10px;
  }

  .case-body .section-title {
    font-size: 25px;
  }

  .case-steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .case-step + .case-step::before {
    content: "↓";
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
  }

  .client-item {
    padding: 18px;
  }

  /* 先生の声 */
  .teacher-list {
    gap: 16px;
    margin-top: 26px;
  }

  .teacher-item {
    padding: 22px;
  }

  .teacher-quote {
    font-size: 15px;
  }

  /* 導入までの流れ */
  .flow-list,
  .support-list,
  .flow-figures {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .flow-list {
    margin-top: 26px;
  }

  .flow-item {
    padding: 22px;
  }

  .flow-num {
    font-size: 22px;
  }

  .flow-title {
    margin-top: 6px;
  }

  .support {
    margin-top: 20px;
    padding: 24px 20px;
  }

  .support-title {
    font-size: 17px;
  }

  .support-list {
    gap: 18px;
    margin-top: 18px;
  }

  .flow-figures {
    margin-top: 16px;
  }

  /* フォーム */
  .contact-grid {
    gap: 28px;
  }

  .contact-lead {
    margin-top: 16px;
    font-size: 15px;
  }

  .contact-form {
    padding: 24px 20px;
  }

  /* フッター */
  .site-footer {
    padding: 40px 0 28px;
  }

  .footer-nav {
    flex-direction: column;
    gap: 24px;
    line-height: 2;
  }

  /* 固定CTAバー（設計書 6.1） */
  .fixed-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--border);
    background: #ffffff;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .fixed-cta a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    font-size: 14px;
    font-weight: 700;
  }

  .fixed-cta a:first-child {
    border-right: 1px solid var(--border);
    background: var(--lilac-deep);
    color: var(--brand-primary);
  }

  .fixed-cta a:last-child {
    background: var(--brand-primary);
    color: #ffffff;
  }
}

@media (min-width: 768px) {
  .global-nav .nav-actions {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}

@media print {
  .site-header {
    position: static;
  }

  .fixed-cta,
  .nav-toggle,
  .contact-form {
    display: none;
  }
}

@media (max-width: 359.98px) {
  .form-captcha .cf-turnstile {
    width: 300px;
    transform: scale(0.85);
    transform-origin: 0 0;
  }

  .form-captcha {
    height: 56px;
  }
}
