/* ============================================================
   HOUKAN-X 支援事例（一覧・詳細・トップの事例欄）
   _cases/build.mjs が書き出すページで使う
   ============================================================ */

/* ---------- カード ---------- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.case-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.case-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(31, 36, 48, 0.08);
}

.case-card[hidden] { display: none; }

.case-card__visual {
  height: 190px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--accent-soft), #f4f6fb);
  padding: 22px 22px 0;
  pointer-events: none;
}

.case-card__body {
  padding: 26px 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.case-card__theme {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid rgba(91, 92, 226, 0.35);
  border-radius: 999px;
  padding: 3px 12px;
}

.case-card__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.75;
  color: var(--ink);
  flex: 1;
}

.case-card__client {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}

.case-card__logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: contain;
  flex: none;
}

/* 横長のロゴは高さをそろえて幅は成り行き */
img.case-card__logo { width: auto; max-width: 64px; border-radius: 4px; }

.case-card__logo--text,
.case-client__logo--text {
  display: grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
}

.case-card__logo--text { font-size: 0.8rem; }

.case-card__draft {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #8a5a00;
  background: #fff4d6;
  border-radius: 999px;
  padding: 3px 10px;
}

/* ---------- 一覧 ---------- */
.case-list-section { padding-top: 40px; }

.case-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 44px;
}

.case-filter__chip {
  font: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.case-filter__chip small {
  font-family: var(--font-en);
  font-size: 0.78rem;
  color: var(--muted);
}

.case-filter__chip:hover { border-color: var(--accent); }

.case-filter__chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.case-filter__chip.is-active small { color: rgba(255, 255, 255, 0.75); }

/* ---------- 詳細 ---------- */
.case-hero { padding-bottom: 64px; }

.case-hero__theme {
  position: relative;
  z-index: 1;
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: 18px;
}

.case-hero__title {
  position: relative;
  z-index: 1;
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  font-weight: 900;
  line-height: 1.55;
  color: var(--ink);
  max-width: 900px;
}

.case-hero__lead {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  font-size: 1.02rem;
  line-height: 2.1;
  max-width: 780px;
}

.case-client {
  position: relative;
  z-index: 1;
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 28px;
  max-width: 780px;
}

.case-client__logo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: contain;
  flex: none;
}

img.case-client__logo { width: auto; max-width: 140px; border-radius: 8px; }

.case-client__missing { color: #b07a00 !important; font-weight: 500 !important; }

.case-client__logo--text { font-size: 1.5rem; }

.case-client dl {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
}

.case-client dt {
  font-size: 0.74rem;
  color: var(--muted);
}

.case-client dd {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.case-wrap {
  width: min(980px, 92%);
  padding: 24px 0 110px;
}

.case-sec {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  padding: 64px 0;
  border-top: 1px solid var(--line);
}

.case-sec:first-of-type { border-top: none; }

.case-sec__head span {
  font-family: var(--font-en);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

.case-sec__head p {
  font-family: var(--font-en);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  margin: 4px 0 6px;
}

.case-sec__head h2 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
}

.case-points { display: grid; gap: 14px; }

.case-points li {
  position: relative;
  padding-left: 26px;
  font-size: 1rem;
  line-height: 1.95;
  color: var(--ink);
}

.case-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.8em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--accent);
}

.case-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.case-step {
  background: var(--bg-gray);
  border-radius: 16px;
  padding: 26px 26px 28px;
}

.case-step span {
  font-family: var(--font-en);
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
}

.case-step h3 {
  font-size: 1.02rem;
  color: var(--ink);
  margin: 6px 0 10px;
  line-height: 1.6;
}

.case-step p {
  font-size: 0.9rem;
  line-height: 1.95;
}

/* グリッドの中で再現画面（幅1120px）が枠を押し広げないようにする */
.case-sec__body { min-width: 0; }

.case-shot { margin-bottom: 36px; min-width: 0; }

.case-shot figcaption {
  margin-top: 14px;
  font-size: 0.86rem;
  color: var(--muted);
}

.case-shot > img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.case-note {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 12px 16px;
  background: var(--bg-gray);
  border-radius: 10px;
}

.case-voice {
  margin-top: 24px;
  background: var(--navy);
  color: #fff;
  border-radius: 22px;
  padding: 48px 52px;
}

.case-voice__text {
  font-size: 1.05rem;
  line-height: 2.1;
}

.case-voice__name {
  margin-top: 22px;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.7);
}

.case-link-btn { margin-top: 14px; }

/* 下書きプレビューでだけ出る */
.case-preview-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: #fff4d6;
  color: #8a5a00;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  padding: 8px 16px;
}

.case-todo {
  margin-top: 32px;
  background: #fff9e8;
  border: 1px dashed #e0b84d;
  border-radius: 14px;
  padding: 20px 24px;
  font-size: 0.88rem;
}

.case-todo p {
  font-weight: 700;
  color: #8a5a00;
  margin-bottom: 8px;
}

.case-todo .case-points li { font-size: 0.88rem; }
.case-todo .case-points li::before { border-color: #e0b84d; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 1024px) {
  .case-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .case-grid { grid-template-columns: 1fr; }
  .case-sec { grid-template-columns: 1fr; gap: 20px; padding: 48px 0; }
  .case-steps { grid-template-columns: 1fr; }
  .case-client { flex-direction: column; align-items: flex-start; padding: 20px; }
  .case-voice { padding: 34px 26px; }
}

/* ============================================================
   実物を再現した画面（_cases/mocks/*.html、幅1120pxを枠に合わせて縮小）
   ============================================================ */
.shot {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(31, 36, 48, 0.12);
}

.shot__bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: #eef0f4;
  border-bottom: 1px solid var(--line);
}

.shot__bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d5d8e0;
}

.shot__view { --z: 0.8; overflow: hidden; min-width: 0; }

.shot__canvas {
  width: 1120px;
  zoom: var(--z);
}

.case-card__visual .shot {
  border-radius: 10px 10px 0 0;
  border-bottom: none;
  box-shadow: 0 10px 30px rgba(31, 36, 48, 0.1);
}

.case-card__visual .shot__view { --z: 0.3; }
