:root {
  /* Color */
  --color-primary: #0091d6;
  --color-primary-dark: #0b5fa8;
  --color-primary-light: #5bc2e7;
  --color-primary-pale: #eaf6fc;
  /* 本文中マーカー用。primary-pale は白背景では視認できないため一段濃いトーン */
  --color-primary-pale-strong: #cfe9f7;
  --color-secondary: #ffe800;
  --color-neutral-dark: #45465e;
  --color-bg: #ffffff;
  --color-bg-subtle: #f5f8fa;
  --color-text: #1b2a4e;
  /* #6b7686 は bg-subtle 上で 4.32:1 と WCAG AA(4.5) に僅かに届かないため微調整 */
  --color-text-muted: #656f7d;
  --color-text-inverse: #ffffff;
  --color-border: #d5e1ea;
  --color-cat-d: #8e4257;

  /* Typography */
  --font-jp: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-en: "Inter", "Helvetica Neue", Arial, sans-serif;
  --tracking-jp: 0.04em;
  --leading-body: 1.9;

  /* Spacing */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 32px;
  --space-4: 64px;
  --space-5: 96px;
  --content-max: 1200px;
  --content-narrow: 800px;
  --content-wide: 1000px;
  --hero-frames-max: 1440px;
  --gutter: 16px;
  --section-pad: 48px;
  --header-h: 72px;

  /* Shape */
  --radius-card: 16px;
  --radius-button: 9999px;
  --radius-tag: 4px;
  --radius-section: 80px;
  --shadow-card: 0 4px 12px rgba(11, 95, 168, 0.08);
}

@media (min-width: 640px) {
  :root {
    --gutter: 32px;
    --section-pad: 72px;
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: 40px;
    --section-pad: 96px;
    --header-h: 80px;
  }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  /* CTAからお問い合わせフォームへの遷移をスクロールアニメーションにする */
  scroll-behavior: smooth;
}

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

/* ヘッダーは position: fixed のため、アンカー着地点が隠れないよう余白を確保 */
main section[id] { scroll-margin-top: var(--header-h); }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-jp);
  letter-spacing: var(--tracking-jp);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  /* 日本語の禁則処理を厳密に適用（行頭に「。」「、」「」」等が来るのを防ぐ） */
  line-break: strict;
}

/* 見出しは行長を均等化し、1〜2文字だけが最終行に残る「取り残し」を防ぐ */
h1, h2, h3,
.section-heading,
.institution__heading,
.reasons__heading,
.mid-cta h2,
.final-cta__heading-mobile {
  text-wrap: balance;
}

/* 本文は最終行が極端に短くなるのを抑制 */
p { text-wrap: pretty; }

/* 本文中の文境界の改行はデスクトップの読みやすさ用。狭い幅では
   各文が独立に折り返して短い端行を作るため、改行を無効化して自然に流す。 */
@media (max-width: 639.98px) {
  br.br-pc { display: none; }
}

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

/* primary(#0091d6) は白背景で 3.49:1 のため本文リンクは primary-dark を既定にする */
a { color: var(--color-primary-dark); }
a:hover { color: var(--color-primary-dark); text-decoration-thickness: 2px; }

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

.wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.wrap--narrow { max-width: var(--content-narrow); }

.section {
  padding-top: var(--section-pad);
  padding-bottom: var(--section-pad);
}

.section--bg { background: var(--color-bg); }
.section--subtle { background: var(--color-bg-subtle); }
.section--primary-dark { background: var(--color-primary-dark); color: var(--color-text-inverse); }

.section--curve-tr { border-radius: 0 var(--radius-section) 0 0; }
.section--curve-tl { border-radius: var(--radius-section) 0 0 0; }

@media (max-width: 639px) {
  .section--curve-tr,
  .section--curve-tl { border-radius: 0 0 0 0; }
}

.section-heading {
  margin: 0;
  text-align: center;
  font-weight: 900;
  color: var(--color-text);
  letter-spacing: var(--tracking-jp);
  font-size: clamp(1.375rem, 3.2vw, 1.625rem);
  line-height: 1.5;
}

.section--primary-dark .section-heading { color: var(--color-text-inverse); }

.section-lead {
  margin: 14px 0 0;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--color-text);
}

.section--primary-dark .section-lead { color: rgba(255, 255, 255, 0.9); }

/* Scroll reveal (generic — used on content sections between the flow timeline and the contact form) */
[data-reveal] {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--reveal-delay, 0s);
}

[data-reveal="up"] { transform: translateY(28px); }
[data-reveal="top"] { transform: translateY(-24px); }
[data-reveal="left"] { transform: translateX(-40px); }
[data-reveal="right"] { transform: translateX(40px); }
[data-reveal="scale"] { transform: scale(0.9); }

[data-reveal-section].is-inview [data-reveal] {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* 表示前の初期位置（translateX）が横スクロールを生むのを防ぐ。
   デスクトップは .wrap の外側に余白があるため収まるが、タブレット以下では
   余白が --gutter しかなく、ズレ分がそのままビューポート外へはみ出す。
   overflow-x: hidden は overflow-y を auto に変えてしまうため clip を使う。 */
[data-reveal-section],
#flow {
  overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* 本文中の強調。装飾を増やさないよう、原則この3クラスから選ぶ
   .em-key    強: 太字＋Primary Dark＋淡いブルーのマーカー（白背景の本文用）
   .em        弱: 太字のみ（Primary Dark 背景上では白）
   .em-accent 濃紺背景上でのアクセント強調（イエロー） */
.em { font-weight: 900; }

.em-key {
  font-weight: 900;
  color: var(--color-primary-dark);
  background-image: linear-gradient(transparent 62%, var(--color-primary-pale-strong) 62%);
}

.section--primary-dark .em { color: var(--color-text-inverse); }

.em-accent { font-weight: 900; color: var(--color-secondary); }

/* Section corner decorations (mid-cta / pricing / reasons / faq) */
#mid-cta,
#pricing,
#reasons,
#faq {
  position: relative;
}

/* Content sits above the decoration; the decoration itself must stay at z-index 0
   (a negative value would drop it behind the section's own opaque background). */
#mid-cta > .wrap,
#pricing > .wrap,
#reasons > .wrap,
#faq > .wrap {
  position: relative;
  z-index: 1;
}

.section-decor {
  position: absolute;
  bottom: 0;
  z-index: 0;
  width: clamp(140px, 16vw, 240px);
  height: auto;
  pointer-events: none;
  user-select: none;
}

.section-decor--left { left: 2%; }
.section-decor--right { right: 10%; }

@media (max-width: 639.98px) {
  .section-decor { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  border-radius: var(--radius-button);
  font-family: var(--font-jp);
  letter-spacing: var(--tracking-jp);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }

/* .btn already owns a snappy hover transition; keep it intact and only add a
   delayed opacity fade-in for the scroll-reveal system (see [data-reveal] above). */
.btn[data-reveal] {
  transition: transform 0.15s ease, background-color 0.15s ease, opacity 0.7s ease;
  transition-delay: 0s, 0s, var(--reveal-delay, 0s);
}

.btn--lg { padding: 16px 32px; font-size: 0.9375rem; }
.btn--xl { padding: 18px 40px; font-size: 1rem; font-weight: 900; }

.btn--accent { background: var(--color-secondary); color: var(--color-text); font-weight: 900; }
.btn--accent:hover { background: #f2dc00; }

.btn--pill-accent-header {
  background: var(--color-secondary);
  color: var(--color-text);
  padding: 12px 22px;
  font-size: 0.84375rem;
  font-weight: 700;
}

/* Tablet and below: the fixed bottom CTA bar covers this role, so drop the header button */
@media (max-width: 1023.98px) {
  .btn--pill-accent-header { display: none; }
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--color-primary-dark);
  height: var(--header-h);
  display: flex;
  align-items: center;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.site-header.is-scrolled { opacity: 0.7; }

.site-header:hover { opacity: 1; }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.site-header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-header__mark {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
  flex: none;
}

.site-header__name {
  font-size: clamp(0.9375rem, 2.6vw, 1.3125rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: var(--tracking-jp);
  white-space: nowrap;
}

/* Hero entrance animation */
@keyframes hero-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes hero-fade-top {
  from { opacity: 0; transform: translateY(-24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-fade-left {
  from { opacity: 0; transform: translateX(-48px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Hero */
.hero {
  position: relative;
  background: var(--color-primary-dark);
  overflow: hidden;
  padding-top: calc(var(--header-h) + 28px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
}

.hero__frames {
  display: flex;
  gap: 16px;
  align-items: stretch;
  padding: 0 var(--gutter);
}

.hero__frame {
  flex: 1;
  height: 220px;
  max-width: 360px;
  border: 4px solid #fff;
  border-radius: var(--radius-card);
  overflow: hidden;
}

.hero__frame--wide { flex: 1.15; }

.hero__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (min-width: 1024px) {
  .hero__frames {
    padding-left: 0;
    padding-right: 0;
    gap: 24px;
    max-width: var(--hero-frames-max);
    margin-left: auto;
    margin-right: auto;
  }
  .hero__frame { height: 420px; }
  .hero__frame:first-child { margin-left: -40px; }

  /* Entrance: right frame first, each sliding in from the left */
  .hero__frame {
    opacity: 0;
    animation: hero-fade-left 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  .hero__frame:nth-child(3) { animation-delay: 0.1s; }
  .hero__frame:nth-child(2) { animation-delay: 0.28s; }
  .hero__frame:nth-child(1) { animation-delay: 0.46s; }
}

/* Hero slideshow (smartphone / tablet — desktop keeps the flex layout above untouched) */
@media (max-width: 1023.98px) {
  .hero__frames {
    --hero-frame-size: clamp(160px, 52vw, 220px);
    --hero-frame-gap: 14px;
    --hero-frame-edge: 20px;
    --pos-main: calc(100vw - var(--hero-frame-size) - var(--hero-frame-edge));
    --pos-secondary: calc(100vw - 2 * var(--hero-frame-size) - var(--hero-frame-gap) - var(--hero-frame-edge));
    --pos-waiting: calc(100vw - 3 * var(--hero-frame-size) - 2 * var(--hero-frame-gap) - var(--hero-frame-edge));
    --pos-exit: calc(100vw + var(--hero-frame-edge));
    display: block;
    position: relative;
    height: var(--hero-frame-size);
    padding: 0;
    overflow: hidden;
  }

  .hero__frame,
  .hero__frame--wide {
    position: absolute;
    top: 0;
    left: 0;
    flex: none;
    width: var(--hero-frame-size);
    height: var(--hero-frame-size);
    transition: transform 0.7s ease, opacity 0.7s ease;
    will-change: transform, opacity;
  }

  .hero__frame.no-transition { transition: none; }

  /* No-JS fallback: DOM order doubles as main / secondary / waiting */
  .hero__frame:nth-child(1) { transform: translateX(var(--pos-main)); opacity: 1; z-index: 3; }
  .hero__frame:nth-child(2) { transform: translateX(var(--pos-secondary)); opacity: 1; z-index: 2; }
  .hero__frame:nth-child(3) { transform: translateX(var(--pos-waiting)); opacity: 1; z-index: 1; }

  /* JS-driven roles, cycled among the same 3 elements (must stay after the nth-child rules above) */
  .hero__frame.is-main { transform: translateX(var(--pos-main)); opacity: 1; z-index: 3; }
  .hero__frame.is-secondary { transform: translateX(var(--pos-secondary)); opacity: 1; z-index: 2; }
  .hero__frame.is-waiting { transform: translateX(var(--pos-waiting)); opacity: 1; z-index: 1; }
  .hero__frame.is-exiting { transform: translateX(var(--pos-exit)); opacity: 0; z-index: 4; }
}

@media (max-width: 1023.98px) and (prefers-reduced-motion: reduce) {
  .hero__frame { transition: none !important; }
}

@media (min-width: 1024px) and (prefers-reduced-motion: reduce) {
  .hero__frame,
  .hero__catch-plate { animation: none !important; opacity: 1 !important; transform: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__body,
  .hero__catch-mobile { animation: none !important; opacity: 1 !important; }
}

.hero__catch {
  display: none;
}

@media (min-width: 1024px) {
  .hero__catch {
    display: flex;
    gap: 10px;
    flex: none;
    padding-right: 36px;
  }
  .hero__catch-plate {
    background: #fff;
    padding: 20px 12px;
    border-radius: 2px;
    writing-mode: vertical-rl;
    font-size: 2rem;
    font-weight: 900;
    color: var(--color-primary-dark);
    letter-spacing: 0.12em;
  }
  .hero__catch-plate--a { height: 380px; margin-top: 20px; }
  .hero__catch-plate--b { height: 410px; }

  /* Entrance: ①「AIを安心して活用するためのルール」(b, 右) → ②「整っていますか？」(a, 左) の順に上からフェードイン */
  .hero__catch-plate {
    opacity: 0;
    animation: hero-fade-top 0.6s ease forwards;
  }
  .hero__catch-plate--b { animation-delay: 0.75s; }
  .hero__catch-plate--a { animation-delay: 1s; }
}

.hero__catch-mobile {
  margin: 24px 0 0;
  padding: 0 var(--gutter);
  text-align: center;
  line-height: 1.9;
  opacity: 0;
  animation: hero-fade-in 0.6s ease forwards;
  animation-delay: 0.25s;
}

.hero__catch-mobile-text {
  display: inline;
  background: #fff;
  color: var(--color-primary-dark);
  font-weight: 900;
  letter-spacing: var(--tracking-jp);
  font-size: clamp(1.375rem, 6vw, 1.75rem);
  padding: 2px 14px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

@media (min-width: 1024px) { .hero__catch-mobile { display: none; } }

.hero__body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  padding: 28px var(--gutter) 44px;
  opacity: 0;
  animation: hero-fade-in 0.6s ease forwards;
  animation-delay: 1.75s;
}

@media (min-width: 1024px) {
  .hero__body {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    padding: 28px 36px 44px;
  }
}

/* 見出しとサブコピーで必要な行長が違うため、コンテナ側では折り返しを縛らず
   本文（p）だけに読みやすい行長を与える。これで見出しがサブコピーの
   max-width に押し込まれて語中で改行される事故を防ぐ。 */
.hero__copy { max-width: 100%; }

.hero__copy p {
  margin: 0;
  max-width: 560px;
  font-size: 0.90625rem;
  line-height: 1.9;
  letter-spacing: var(--tracking-jp);
  color: #fff;
}

/* FVメインコピー（ページのh1） */
.hero__lead {
  margin: 0 0 18px;
  color: #fff;
  font-weight: 900;
  font-size: clamp(1.125rem, 2.1vw, 1.75rem);
  line-height: 1.5;
  letter-spacing: var(--tracking-jp);
  /* 行の区切りは span で明示する。keep-all により、万一1行に収まらない幅でも
     「でつく／る、」のような語中改行にはならず句切りで折り返す。
     nowrap は使わない（Webフォント読み込み失敗時に文字が切れるため） */
  word-break: keep-all;
  text-wrap: initial;
}

.hero__lead-line { display: block; }

.hero__copy .btn { margin-top: 24px; }

/* Worries section */
.worries__title { max-width: var(--content-wide); margin: 0 auto; }

.worries__grid {
  display: grid;
  gap: 40px;
  margin: 44px auto 0;
  max-width: var(--content-wide);
  align-items: center;
}

@media (min-width: 1024px) {
  .worries__grid { grid-template-columns: 1.08fr 0.92fr; gap: 48px; }
}

.worries__list {
  display: grid;
  gap: 26px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.worry-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.worry-item:nth-child(1) { --reveal-delay: 0s; }
.worry-item:nth-child(2) { --reveal-delay: 0.2s; }
.worry-item:nth-child(3) { --reveal-delay: 0.4s; }
.worry-item:nth-child(4) { --reveal-delay: 0.6s; }
.worry-item:nth-child(5) { --reveal-delay: 0.8s; }

.worry-check {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-primary-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  overflow: visible;
}

.worry-check svg { overflow: visible; transform: translate(1px, -2px); }

.worry-check-path {
  stroke: var(--color-primary);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 26;
  stroke-dashoffset: 26;
  transition: stroke-dashoffset 0.55s cubic-bezier(0.65, 0, 0.35, 1);
}

.worry-check-path.is-drawn { stroke-dashoffset: 0; }

.worry-item p {
  margin: 0;
  font-size: 0.96875rem;
  line-height: 1.8;
  letter-spacing: var(--tracking-jp);
  color: var(--color-text);
}

.worries__art {
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
  margin: 0; /* <figure> のUA既定マージンを打ち消す */
  --reveal-delay: 0.3s;
}

.worries__art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.worries__resolve {
  margin: 48px 0 0;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--color-primary-dark);
  letter-spacing: var(--tracking-jp);
  line-height: 1.6;
  --reveal-delay: 1s;
}

/* Institution section */
.institution__grid {
  display: grid;
  gap: 32px;
  max-width: var(--content-wide);
  margin: 0 auto;
  align-items: center;
}

@media (min-width: 1024px) {
  .institution__grid { grid-template-columns: 0.85fr 1.15fr; gap: 44px; }
}

.institution__grid > [data-reveal="right"] { --reveal-delay: 0.65s; }

.institution__frame {
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.institution__frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

@media (min-width: 1024px) { .institution__frame { margin: 0; } }

.institution__heading {
  margin: 0 0 22px;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  line-height: 1.6;
  font-weight: 900;
  color: var(--color-text);
  letter-spacing: var(--tracking-jp);
  text-align: center;
}

@media (min-width: 1024px) { .institution__heading { text-align: left; } }

.institution__text p {
  margin: 0 0 18px;
  font-size: 0.90625rem;
  line-height: 1.9;
  letter-spacing: var(--tracking-jp);
  color: var(--color-text);
}

.institution__text p:last-child { margin-bottom: 0; }

/* Merits */
.merits__head { max-width: var(--content-wide); margin: 0 auto; }

.merits__grid {
  display: grid;
  gap: var(--space-2);
  max-width: var(--content-wide);
  margin: var(--space-3) auto 0;
}

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

.merit-card {
  background: #fff;
  border-radius: var(--radius-card);
  padding: 24px;
}

.merit-card:nth-child(1) { --reveal-delay: 0.3s; }
.merit-card:nth-child(2) { --reveal-delay: 0.53s; }
.merit-card:nth-child(3) { --reveal-delay: 0.77s; }
.merit-card:nth-child(4) { --reveal-delay: 1.01s; }

@media (min-width: 640px) { .merit-card { padding: 28px; } }

.merit-card__num {
  font-family: var(--font-en);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--color-primary-dark); /* 小さい文字のためAA確保（primaryは3.49:1） */
}

.merit-card h3 {
  margin: 8px 0 10px;
  font-size: 1.125rem;
  font-weight: 900;
  color: var(--color-text);
  line-height: 1.5;
}

.merit-card p {
  margin: 0;
  font-size: 0.84375rem;
  line-height: 1.8;
  color: var(--color-text);
}

/* Mid-CTA (つくるだけのルール...) */
.mid-cta { max-width: var(--content-narrow); margin: 0 auto; text-align: center; }

.mid-cta h2 {
  margin: 0;
  font-size: clamp(1.375rem, 3.4vw, 1.75rem);
  font-weight: 900;
  color: var(--color-text);
  line-height: 1.6;
  letter-spacing: var(--tracking-jp);
}

.mid-cta__body {
  margin: 26px 0 0;
  font-size: 0.90625rem;
  line-height: 1.9;
  letter-spacing: var(--tracking-jp);
  color: var(--color-text);
  text-align: left;
  --reveal-delay: 0.36s;
}

.mid-cta__body p { margin: 0 0 18px; }
.mid-cta__body p:last-child { margin-bottom: 0; }

.mid-cta .btn { margin-top: 28px; --reveal-delay: 0.85s; }

/* 途中CTA: 見出しマーカー */
.mid-cta h2 mark {
  background: none;
  color: var(--color-primary-dark);
  background-image: linear-gradient(transparent 62%, var(--color-secondary) 62%);
}

/* 途中CTA: 締めの一文 */
.mid-cta__closing {
  margin: 22px 0 0;
  text-align: center;
  font-size: clamp(1.0625rem, 2.8vw, 1.25rem);
  font-weight: 900;
  line-height: 1.6;
  letter-spacing: var(--tracking-jp);
  color: var(--color-primary-dark);
}

/* Flow / timeline */
.flow__head {
  text-align: center;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#flow.is-inview .flow__head { opacity: 1; }

/* Per-step reveal timing: card, line, dot and month tag all read this same delay */
.flow-step:nth-child(1) { --step-delay: 0s; }
.flow-step:nth-child(2) { --step-delay: 0.15s; }
.flow-step:nth-child(3) { --step-delay: 0.3s; }
.flow-step:nth-child(4) { --step-delay: 0.45s; }
.flow-step:nth-child(5) { --step-delay: 0.6s; }
.flow-step:nth-child(6) { --step-delay: 0.75s; }
.flow-step:nth-child(7) { --step-delay: 0.9s; }

.flow__avg {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin: 18px 0 0;
  background: #fff;
  border-radius: var(--radius-button);
  padding: 10px 24px;
}

.flow__avg-label { font-size: 0.8125rem; font-weight: 700; color: var(--color-primary-dark); letter-spacing: var(--tracking-jp); }
.flow__avg-value { font-size: 1.25rem; font-weight: 900; color: var(--color-primary-dark); letter-spacing: 0.02em; }

.flow__note {
  margin: 14px 0 0;
  font-size: 0.75rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}

.flow-timeline {
  margin: 40px 0 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  padding: 0;
}

.flow-step {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
}

@media (min-width: 640px) {
  .flow-step { grid-template-columns: 120px 48px minmax(0, 1fr); }
}

.flow-step__period {
  display: none;
}

@media (min-width: 640px) {
  .flow-step__period {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .flow-step__period-tag {
    background: #fff;
    color: var(--color-primary-dark);
    font-size: 0.8125rem;
    font-weight: 900;
    letter-spacing: var(--tracking-jp);
    width: 120px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
  }
  .flow-step__period-tag--accent { background: var(--color-secondary); }
  .flow-step__period-tag--outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.75);
    color: #fff;
  }
  .flow-step__period-tag {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    transition-delay: var(--step-delay, 0s);
  }
  #flow.is-inview .flow-step__period-tag { opacity: 1; transform: translateY(0); }
}

.flow-step__period-tag-mobile {
  margin: 0 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--color-primary-dark);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: var(--tracking-jp);
  padding: 5px 12px;
  border-radius: 8px;
}

.flow-step__period-tag-mobile--accent { background: var(--color-secondary); }
.flow-step__period-tag-mobile--outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.75);
  color: #fff;
}

.flow-step__period-tag-mobile {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition-delay: var(--step-delay, 0s);
}

#flow.is-inview .flow-step__period-tag-mobile { opacity: 1; transform: translateY(0); }

@media (min-width: 640px) { .flow-step__period-tag-mobile { display: none; } }

.flow-step__rail {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flow-step__line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.4);
  display: block;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.5s ease;
  transition-delay: var(--step-delay, 0s);
}

#flow.is-inview .flow-step__line { transform: scaleY(1); }

.flow-step:last-child .flow-step__line { height: 50%; border-left: 2px dashed rgba(255, 255, 255, 0.55); background: none; width: 0; top: 0; bottom: auto; }

.flow-step__dot {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-secondary);
  border: 4px solid #fff;
  display: block;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.4s ease, transform 0.4s ease;
  transition-delay: var(--step-delay, 0s);
}

#flow.is-inview .flow-step__dot { opacity: 1; transform: scale(1); }

.flow-step__dot--final { width: 16px; height: 16px; border-width: 5px; }
.flow-step__dot--after { background: #fff; border: 4px solid rgba(255, 255, 255, 0.5); }

.flow-step__body { padding: 9px 0 24px; }

.flow-step:last-child .flow-step__body { padding-bottom: 0; }

.flow-card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  opacity: 0;
  transform: translateX(56px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--step-delay, 0s);
}

#flow.is-inview .flow-card { opacity: 1; transform: translateX(0); }

@media (min-width: 640px) { .flow-card { padding: 22px 26px; gap: 22px; } }

.flow-card--final {
  border: 3px solid var(--color-secondary);
  box-shadow: 0 8px 20px rgba(11, 95, 168, 0.18);
}

.flow-card--after {
  background: var(--color-primary-pale);
  border: 3px solid var(--color-primary-light);
  box-shadow: var(--shadow-card);
}

.flow-icon {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: var(--color-primary-pale);
  overflow: hidden;
}

.flow-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

@media (min-width: 640px) { .flow-icon { width: 84px; height: 84px; } }

.flow-card--after .flow-icon { background: #fff; }

.flow-card__label {
  display: inline-block;
  font-family: var(--font-en);
  font-weight: 900;
  font-size: 0.78125rem;
  letter-spacing: 0.1em;
  color: #fff;
  background: var(--color-primary-dark); /* 白文字とのAA確保（primaryは3.49:1） */
  border-radius: var(--radius-button);
  padding: 5px 14px;
}

.flow-card--final .flow-card__label { color: var(--color-text); background: var(--color-secondary); }

.flow-card h3 {
  margin: 10px 0 8px;
  font-size: 1.09375rem;
  font-weight: 900;
  color: var(--color-text);
  letter-spacing: var(--tracking-jp);
}

.flow-card p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.8;
  letter-spacing: var(--tracking-jp);
  color: var(--color-text);
}

.flow-card--after p { font-size: 0.90625rem; font-weight: 700; }

.flow-card__label--after { background: var(--color-primary-light); color: var(--color-text); }

@media (prefers-reduced-motion: reduce) {
  .flow__head,
  .flow-card,
  .flow-step__line,
  .flow-step__dot,
  .flow-step__period-tag,
  .flow-step__period-tag-mobile {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Pricing */
.pricing__head { max-width: var(--content-narrow); margin: 0 auto; }

.pricing__grid {
  display: grid;
  gap: 24px;
  max-width: var(--content-narrow);
  margin: var(--space-3) auto 0;
}

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

.price-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 28px;
  --reveal-delay: 0.4s;
}

@media (min-width: 640px) { .price-card { padding: 32px; } }

.price-card--featured {
  border: 4px solid var(--color-primary-dark);
  box-shadow: 0 8px 20px rgba(11, 95, 168, 0.16);
  padding: 25px;
  --reveal-delay: 0.8s;
}

@media (min-width: 640px) { .price-card--featured { padding: 29px; } }

.price-card h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--color-text);
  letter-spacing: var(--tracking-jp);
}

.price-card__amount {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 14px 0 0;
}

.price-card__amount .num { font-family: var(--font-en); font-weight: 900; font-size: 2.25rem; letter-spacing: -0.02em; color: var(--color-primary); }
.price-card--featured .price-card__amount .num { color: var(--color-primary-dark); }
.price-card__amount .unit { font-size: 1.125rem; font-weight: 900; color: var(--color-primary-dark); }
.price-card--featured .price-card__amount .unit { color: var(--color-primary-dark); }
.price-card__amount .tax { font-size: 0.875rem; font-weight: 700; color: var(--color-text-muted); }

.price-card__period {
  display: inline-block;
  margin: 16px 0 0;
  background: var(--color-primary-pale);
  color: var(--color-primary-dark); /* pale背景上でのAA確保（primaryは3.17:1） */
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-tag);
  letter-spacing: 0.05em;
}

.price-card--featured .price-card__period { color: var(--color-primary-dark); }

.price-card p.price-card__desc {
  margin: 18px 0 0;
  font-size: 0.875rem;
  line-height: 1.8;
  letter-spacing: var(--tracking-jp);
  color: var(--color-text);
}

/* Reasons */
.reasons__layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: var(--content-wide);
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .reasons__layout { flex-direction: row; align-items: flex-start; gap: 32px; }
}

.reasons__label {
  display: none;
}

@media (min-width: 1024px) {
  .reasons__label {
    display: block;
    flex: none;
    background: var(--color-primary-dark);
    color: #fff;
    padding: 18px 12px;
    border-radius: 2px;
    writing-mode: vertical-rl;
    font-size: 1.625rem;
    font-weight: 900;
    letter-spacing: 0.14em;
  }
}

.reasons__body { flex: 1; }

.reasons__kicker {
  margin: 0 0 8px;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 900;
  color: var(--color-primary-dark);
  letter-spacing: 0.14em;
  --reveal-delay: 0.1s;
}

@media (min-width: 1024px) {
  .reasons__kicker { display: none; }
}

.reasons__heading {
  margin: 0;
  font-size: clamp(1.375rem, 3.2vw, 1.625rem);
  font-weight: 900;
  color: var(--color-text);
  letter-spacing: var(--tracking-jp);
  text-align: center;
  --reveal-delay: 0.1s;
}

@media (min-width: 1024px) { .reasons__heading { text-align: left; } }

.reasons__grid {
  display: grid;
  gap: 18px;
  margin: var(--space-3) 0 0;
}

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

.reason-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
}

.reason-card:nth-child(1) { --reveal-delay: 0.38s; }
.reason-card:nth-child(2) { --reveal-delay: 0.61s; }
.reason-card:nth-child(3) { --reveal-delay: 0.83s; }
.reason-card:nth-child(4) { --reveal-delay: 1.06s; }

@media (min-width: 640px) { .reason-card { padding: 28px; } }

.reason-card__num {
  font-family: var(--font-en);
  font-weight: 900;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  color: var(--color-primary-dark); /* 小さい文字のためAA確保 */
}

.reason-card h3 {
  margin: 8px 0 12px;
  font-size: 1.1875rem;
  font-weight: 900;
  color: var(--color-text);
  line-height: 1.5;
  letter-spacing: var(--tracking-jp);
}

.reason-card p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.8;
  letter-spacing: var(--tracking-jp);
  color: var(--color-text);
}

.reason-card mark {
  background: none;
  color: inherit;
  font-weight: 900;
  background-image: linear-gradient(transparent 60%, var(--color-secondary) 60%);
}

/* FAQ */
.faq__head { max-width: var(--content-narrow); margin: 0 auto; text-align: center; }

.faq__list {
  display: grid;
  gap: 14px;
  max-width: var(--content-narrow);
  margin: var(--space-3) auto 0;
}

.faq-item {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 22px 20px;
}

@media (min-width: 640px) { .faq-item { padding: 26px 28px; } }

.faq-item:nth-child(1) { --reveal-delay: 0.2s; }
.faq-item:nth-child(2) { --reveal-delay: 0.36s; }
.faq-item:nth-child(3) { --reveal-delay: 0.52s; }
.faq-item:nth-child(4) { --reveal-delay: 0.68s; }
.faq-item:nth-child(5) { --reveal-delay: 0.84s; }
.faq-item:nth-child(6) { --reveal-delay: 1s; }

.faq-item__question {
  display: flex;
  width: 100%;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  font-family: inherit;
}

.faq-item__q-mark {
  flex: none;
  font-family: var(--font-en);
  font-weight: 900;
  font-size: 1.125rem;
  color: var(--color-primary-dark); /* 18px太字はAA基準4.5:1が必要 */
}

.faq-item__question p {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.6;
  letter-spacing: var(--tracking-jp);
  color: var(--color-text);
}

.faq-item__icon {
  flex: none;
  margin-left: auto;
  padding-left: 16px;
  display: flex;
  align-items: center;
  width: 44px;
  height: 44px;
  justify-content: center;
}

.faq-item__icon .v-line {
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
  transform-origin: 12px 12px;
}

.faq-item__question[aria-expanded="true"] .faq-item__icon .v-line { transform: rotate(90deg); }

.faq-item__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s ease;
}

.faq-item__question[aria-expanded="true"] + .faq-item__panel { grid-template-rows: 1fr; }

.faq-item__panel-inner { min-height: 0; overflow: hidden; }

.faq-item__answer {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 16px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--color-border);
}

.faq-item__a-mark {
  flex: none;
  font-family: var(--font-en);
  font-weight: 900;
  font-size: 1.125rem;
  color: var(--color-primary-dark);
}

.faq-item__answer p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.9;
  letter-spacing: var(--tracking-jp);
  color: var(--color-text);
}

/* Final CTA */
.final-cta {
  overflow: hidden;
}

.final-cta__layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: var(--content-narrow);
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .final-cta__layout { flex-direction: row; align-items: flex-start; gap: 36px; }
}

.final-cta__plates {
  display: none;
}

@media (min-width: 1024px) {
  .final-cta__plates { display: flex; gap: 10px; flex: none; }
  .final-cta__plate {
    padding: 18px 12px;
    border-radius: 2px;
    writing-mode: vertical-rl;
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    white-space: nowrap;
  }
  .final-cta__plate--a { background: #fff; color: var(--color-primary-dark); height: 520px; --reveal-delay: 0.42s; }
  .final-cta__plate--b { background: var(--color-secondary); color: var(--color-text); height: 450px; margin-top: 60px; --reveal-delay: 0s; }
}

.final-cta__heading-mobile {
  margin: 0;
  text-align: center;
  font-size: clamp(1.375rem, 5.5vw, 1.75rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: var(--tracking-jp);
  line-height: 1.6;
}

@media (min-width: 1024px) { .final-cta__heading-mobile { display: none; } }

.final-cta__body { flex: 1; }

.final-cta__text {
  margin: 22px 0 0;
  font-size: 0.90625rem;
  line-height: 1.9;
  letter-spacing: var(--tracking-jp);
  color: #fff;
  --reveal-delay: 0.53s;
}

.final-cta__text p { margin: 0 0 18px; }
.final-cta__text p.strong {
  margin: 22px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  font-size: clamp(1.0625rem, 3.2vw, 1.25rem);
  line-height: 1.6;
  font-weight: 900;
}

.final-cta .btn { margin-top: 28px; --reveal-delay: 0.95s; }

/* 最終CTA: 3つの悩みチェックリスト */
.final-cta__text p.final-cta__lead { margin-bottom: 0; }

.final-cta__checks {
  list-style: none;
  margin: 14px 0 18px;
  padding: 18px 20px;
  display: grid;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-card);
}

.final-cta__checks li {
  position: relative;
  padding-left: 30px;
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.final-cta__checks li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.4em;
  width: 16px;
  height: 9px;
  border-left: 3px solid var(--color-text-inverse);
  border-bottom: 3px solid var(--color-text-inverse);
  transform: rotate(-45deg);
}

/* 768px以下では締めの一文とCTAを中央に寄せる（本文の段落は左揃えのまま） */
@media (max-width: 768px) {
  .final-cta__text p.strong { text-align: center; }

  .final-cta__body > .btn {
    display: flex;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }
}

/* Contact form */
.contact__head { text-align: center; }

.contact-form {
  display: grid;
  gap: 22px;
  margin: var(--space-3) auto 0;
  max-width: var(--content-narrow);
}

.contact-form__honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.field { display: grid; gap: 8px; }

.field__label {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: var(--tracking-jp);
  color: var(--color-text);
}

.field__required { color: var(--color-cat-d); }

.field input,
.field textarea {
  font-family: var(--font-jp);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 14px 16px;
  outline: none;
  width: 100%;
}

.field textarea { line-height: 1.8; resize: vertical; }

.field input:focus,
.field textarea:focus {
  border-color: var(--color-primary);
  background: #fff;
}

.field input[aria-invalid="true"] {
  border-color: var(--color-cat-d);
}

.contact-form__field-error,
.contact-form__feedback {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.7;
  letter-spacing: var(--tracking-jp);
}

.contact-form__field-error,
.contact-form__feedback--error {
  color: var(--color-cat-d);
}

.contact-form__feedback--success {
  color: var(--color-primary-dark);
  font-weight: 700;
}

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--color-primary-pale);
  border-radius: 12px;
  padding: 18px 20px;
  cursor: pointer;
}

.consent input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--color-primary);
  flex: none;
}

.consent span {
  font-size: 0.84375rem;
  line-height: 1.8;
  letter-spacing: var(--tracking-jp);
  color: var(--color-text);
}

.consent a { font-weight: 700; }

.contact-submit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 6px 0 0;
}

.contact-submit button {
  font-family: var(--font-jp);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: var(--tracking-jp);
  border: none;
  border-radius: var(--radius-button);
  padding: 18px 56px;
  background: var(--color-border);
  color: var(--color-text-muted);
  cursor: not-allowed;
  transition: background-color 0.2s ease, color 0.2s ease;
  width: 100%;
  max-width: 400px;
}

.contact-submit button.is-ready {
  background: var(--color-primary-dark);
  color: #fff;
  cursor: pointer;
}

.contact-submit__hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--color-text-muted);
  text-align: center;
}

/* Footer */
.site-footer {
  background: var(--color-bg-subtle);
  padding: 44px var(--gutter) calc(44px + 64px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-border);
}

@media (min-width: 1024px) {
  .site-footer { padding-bottom: 44px; }
}

.site-footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-footer__mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: none;
}

.site-footer__name { font-size: 1.125rem; font-weight: 900; color: var(--color-text); letter-spacing: var(--tracking-jp); }
.site-footer__link { font-size: 0.875rem; font-weight: 700; color: var(--color-primary-dark); text-decoration: none; }
.site-footer__copyright { margin: 0; font-size: 0.75rem; color: var(--color-text-muted); }

/* Mobile floating CTA bar */
.mobile-cta-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 10px var(--gutter);
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  background: var(--color-bg);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease;
}

.mobile-cta-bar.is-hidden { transform: translateY(100%); }

.mobile-cta-bar .btn {
  flex: 1;
  justify-content: center;
  width: 100%;
}

@media (min-width: 1024px) {
  .mobile-cta-bar { display: none; }
}

/* image-slot fallback styling (host page provides the frame; the element fills it) */
image-slot { display: block; width: 100%; height: 100%; }
