/* ============================================================
   MirAI 公式HP 共通デザイン（全ページで使い回す）
   ▼ 色の変更は :root の変数だけ。
   ▼ 文字（フォント）の変更は body の font-family と、各HTMLの <link> の2か所。
   ※ トップページの見た目は、これまでのデザインをそのまま引き継いでいます。
   ============================================================ */
:root {
  --ink: #1a1a1a;
  --paper: #ffffff;
  --soft: #f3f3f1;
  --rule: #d9d9d6;
  --muted: #5c5c58;
  --accent: #c1272d; /* 紅：ボタンの色 */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.85;
}

.inner { max-width: 640px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { line-height: 1.4; margin: 0; }
p { margin: 0 0 1em; }
ul, ol, dl { margin: 0; padding: 0; }
li { list-style: none; }
img { max-width: 100%; height: auto; }

a:focus-visible, .btn:focus-visible, .card:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ボタン */
.btn {
  display: block;
  width: 100%;
  max-width: 360px;
  min-height: 52px;
  padding: 14px 20px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  text-align: center;
  text-decoration: none;
  border-radius: 6px;
}
.btn-sm { width: auto; min-height: 40px; padding: 8px 16px; font-size: 14px; }

/* ヘッダー */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(20, 20, 20, 0.92);
}
.bar {
  max-width: 640px;
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { color: #fff; font-weight: 700; font-size: 20px; letter-spacing: 0.04em; text-decoration: none; }

/* ① ファーストビュー：ロゴのスポットライトを下地に */
.hero {
  color: #fff;
  background:
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 70%),
    #141414;
  padding: 72px 0 64px;
}
.hero h1 { font-size: clamp(34px, 10vw, 52px); letter-spacing: 0.02em; margin-bottom: 24px; }
.hero p { color: #e6e6e3; }
.hero p.lead { margin: 28px 0 6px; color: #fff; font-weight: 700; font-size: 18px; }
.hero .btn { margin-top: 20px; }
.note { margin: 12px 0 0; font-size: 14px; color: #bdbdb8 !important; }

/* 共通セクション */
.sec { padding: 56px 0; }
.sec-soft { background: var(--soft); }
.sec h2 { font-size: 24px; margin-bottom: 24px; }
.sec-lead { margin-bottom: 20px; }

/* ② お悩み */
.worries { margin-bottom: 24px; border-top: 1px solid var(--rule); }
.worries li { padding: 14px 0; border-bottom: 1px solid var(--rule); font-weight: 700; }

/* ③ MirAIとは */
.motto { margin: 28px 0 0; padding-left: 14px; border-left: 4px solid var(--accent); font-weight: 700; font-size: 18px; line-height: 1.7; }

/* 理念：言葉は大きく → 短いメッセージ → 説明。2つの間はゆったり空ける */
.principles { margin-top: 44px; }
.principle { padding-left: 16px; border-left: 4px solid var(--accent); }
.principle + .principle { margin-top: 44px; }
.principle-name { font-size: clamp(22px, 6.4vw, 28px); line-height: 1.35; letter-spacing: 0.02em; }
.principle-msg { margin: 10px 0 12px; font-size: 17px; font-weight: 700; color: var(--accent); }
.principle-text { margin: 0; font-size: 16px; line-height: 1.9; }
.nw { display: inline-block; } /* 言葉の途中で改行させない */

/* ④ できること・⑤ 制作事例：カード全体が押せるリンク */
.cards { display: grid; gap: 12px; }
.card {
  display: block;
  padding: 20px 20px 16px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06); }
.card h3 { font-size: 19px; margin-bottom: 6px; }
.card p { margin: 0 0 10px; font-size: 15px; line-height: 1.75; color: var(--muted); }
.more { display: block; text-align: right; font-size: 14px; font-weight: 700; color: var(--accent); }

.mid-cta { margin-top: 36px; }
.mid-cta p { font-weight: 700; margin-bottom: 14px; }

.small { font-size: 14px; color: var(--muted); }

/* ⑥ 流れ（順番に意味があるので番号つき） */
.flow { counter-reset: step; border-top: 1px solid var(--rule); }
.flow li { counter-increment: step; position: relative; padding: 16px 0 16px 44px; border-bottom: 1px solid var(--rule); font-weight: 700; }
.flow li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 16px;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  color: #fff;
  background: var(--ink);
  border-radius: 50%;
  font-size: 14px;
}
.flow span { display: block; font-weight: 400; font-size: 14px; color: var(--muted); }

/* 最後のCTA */
.cta { padding: 56px 0; background: #141414; color: #fff; }
.cta-lead { font-size: 20px; font-weight: 700; line-height: 1.6; margin-bottom: 24px; }

/* フッター */
.site-footer { padding: 36px 0 44px; font-size: 14px; color: var(--muted); }
.foot-name { font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.foot-links span, .foot-links a { margin-right: 16px; }

/* 運営者情報の表 */
.info { width: 100%; border-collapse: collapse; border-top: 1px solid var(--rule); }
.info th, .info td { padding: 14px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.info th { width: 7.5em; padding-right: 12px; font-size: 14px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.info a { color: var(--accent); }
@media (max-width: 420px) {
  .info th, .info td { display: block; width: auto; }
  .info th { padding-bottom: 0; border-bottom: 0; }
  .info td { padding-top: 4px; }
}
.site-footer a { color: var(--muted); word-break: break-all; }
.copy { margin: 16px 0 0; }

/* ============================================================
   下層ページ（サービス詳細・制作事例）
   ============================================================ */
.page-hero { color: #fff; background: #141414; padding: 40px 0 44px; }
.crumb { font-size: 13px; color: #bdbdb8; margin: 0 0 14px; }
.crumb a { color: #bdbdb8; }
.page-hero h1 { font-size: clamp(28px, 8vw, 40px); margin-bottom: 14px; }
.page-hero p { color: #e6e6e3; margin: 0; }
.tag { display: inline-block; margin-bottom: 10px; padding: 2px 10px; font-size: 12px; font-weight: 700; color: #141414; background: #fff; border-radius: 999px; }

.sec h2.h-sm { font-size: 20px; margin-bottom: 16px; }
.block { margin-bottom: 40px; }
.block:last-child { margin-bottom: 0; }

/* 点つきリスト */
.dots li { position: relative; padding: 6px 0 6px 1.1em; border-bottom: 1px solid var(--rule); }
.dots li:first-child { border-top: 1px solid var(--rule); }
.dots li::before { content: ""; position: absolute; left: 0; top: 1.3em; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }

/* 作ったもの／課題／価値 */
.facts dt { margin-top: 18px; font-size: 14px; font-weight: 700; color: var(--accent); }
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: 4px 0 0; }

.memo { margin-top: 16px; padding: 14px 16px; background: var(--soft); border-radius: 8px; font-size: 14px; line-height: 1.75; }
.sec-soft .memo { background: var(--paper); }

/* 画面で見る：手順ごとの写真 */
.step { padding: 28px 0; border-top: 1px solid var(--rule); }
.step:last-child { border-bottom: 1px solid var(--rule); }
.step h3 { font-size: 17px; margin-bottom: 16px; line-height: 1.6; }
.who { display: inline-block; margin-right: 8px; padding: 1px 8px; font-size: 12px; font-weight: 700; border-radius: 4px; vertical-align: 2px; }
.who-guest { background: #fde8e8; color: var(--accent); }
.who-shop { background: var(--ink); color: #fff; }
.who-staff { background: var(--ink); color: #fff; }
.shots { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.shots > * { min-width: 0; }
figure { margin: 0; min-width: 0; }
.phone img { display: block; width: 100%; max-width: 280px; margin: 0 auto; border: 1px solid var(--rule); border-radius: 18px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); }
.screen { overflow-x: auto; border: 1px solid var(--rule); border-radius: 6px; background: #fff; }
.screen img { display: block; width: 100%; min-width: 560px; }
figcaption { margin-top: 10px; font-size: 13px; line-height: 1.6; color: var(--muted); text-align: center; }
.scroll-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); text-align: center; }
@media (min-width: 600px) { .scroll-hint { display: none; } }

/* 写真のない手順（番号つきの文章だけ） */
.steps-text { counter-reset: s; border-top: 1px solid var(--rule); }
.steps-text li { counter-increment: s; position: relative; padding: 14px 0 14px 44px; border-bottom: 1px solid var(--rule); }
.steps-text li::before { content: counter(s); position: absolute; left: 0; top: 14px; width: 30px; height: 30px; line-height: 30px; text-align: center; font-size: 14px; color: #fff; background: var(--ink); border-radius: 50%; }

.back-link { display: inline-block; margin-top: 28px; font-size: 14px; color: var(--muted); }

/* PCでも崩れない・読みやすい余白 */
@media (min-width: 768px) {
  .hero { padding: 120px 0 104px; }
  .sec { padding: 80px 0; }
  .cta { padding: 80px 0; }
  .page-hero { padding: 64px 0 60px; }
  .shots.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
@media (min-width: 520px) and (max-width: 767px) {
  .shots.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}

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

/* スマホの上下バーに隠れないようにする（普通の画面では何も変わりません） */
.site-header { padding-top: env(safe-area-inset-top, 0px); }
.site-footer { padding-bottom: calc(44px + env(safe-area-inset-bottom, 0px)); }
