/* ══════════════════════════════════════
   CASE STUDY — detail page
   Loaded via $page_css on case-study.php
══════════════════════════════════════ */

/* ── Cover image ── */
.csp-cover-wrap {
  width: 100%;
  max-height: 560px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  margin-top: 88px; /* clear fixed nav (28px pad + 32px logo + 28px pad) */
}
.csp-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Project header ── */
.csp-header {
  padding: 96px var(--pad-x) 48px; /* top: clears fixed nav (~88px) + breathing room */
  max-width: calc(760px + 2 * var(--pad-x));
}

.csp-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 24px;
}
.csp-meta span + span::before {
  content: '·';
  margin-right: 8px;
}

.csp-title {
  font-size: var(--text-h1);
  line-height: var(--leading-h1);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 20px;
}

.csp-excerpt {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-2);
  margin-bottom: 24px;
}

.csp-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.csp-chip {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 100px;
}

/* ── Section divider ── */
.csp-divider {
  height: 1px;
  background: var(--border);
  margin: 0 var(--pad-x);
}

/* ── Process sections ── */
.csp-section {
  padding: 64px var(--pad-x);
  border-bottom: 1px solid var(--border);
}

.csp-section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 32px;
}
.csp-section-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  flex-shrink: 0;
}
.csp-section-title {
  font-size: var(--text-h2);
  line-height: var(--leading-h2);
  font-weight: 700;
  color: var(--ink);
}

/* ── AI notice strip (section 02) ── */
.csp-notice {
  background: rgba(232, 50, 10, 0.05);
  border-left: 3px solid var(--red);
  padding: 16px 20px;
  margin-bottom: 32px;
  font-size: 16px;
  color: var(--ink-2);
  line-height: 1.65;
  max-width: 640px;
}
.csp-notice-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
}

/* ── Section body (Quill output) ── */
.csp-section-body {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-2);
  max-width: 640px;
  margin-bottom: 40px;
}
.csp-section-body h2 {
  font-size: var(--text-h2);
  line-height: var(--leading-h2);
  font-weight: 700;
  color: var(--ink);
  margin: 32px 0 16px;
}
.csp-section-body h3 {
  font-size: var(--text-h3);
  line-height: var(--leading-h3);
  font-weight: 700;
  color: var(--ink);
  margin: 24px 0 12px;
}
.csp-section-body p { margin-bottom: 16px; }
.csp-section-body ul,
.csp-section-body ol { padding-left: 24px; margin-bottom: 16px; }
.csp-section-body li { margin-bottom: 8px; }
.csp-section-body strong { color: var(--ink); font-weight: 600; }
.csp-section-body a { color: var(--red); }
.csp-section-body blockquote {
  border-left: 3px solid var(--border);
  padding-left: 20px;
  color: var(--ink-3);
  margin: 24px 0;
}

/* ── Screenshot grid ── */
.csp-screenshots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.csp-screenshots--single { grid-template-columns: 1fr; }
.csp-img {
  width: 100%;
  aspect-ratio: 16/9;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--border);
}

/* ── Bottom navigation ── */
.csp-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 48px var(--pad-x);
  gap: 24px;
}
.csp-nav-back,
.csp-nav-next {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s;
}
.csp-nav-back:hover,
.csp-nav-next:hover { color: var(--red); }
.csp-nav-next {
  text-align: right;
  max-width: 320px;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .csp-cover-wrap { margin-top: 72px; }
  .csp-header { padding: 80px var(--pad-x-sm) 32px; }
  .csp-title { font-size: var(--text-h1); line-height: var(--leading-h1); }
  .csp-excerpt { font-size: 16px; }
  .csp-divider { margin: 0 var(--pad-x-sm); }
  .csp-section { padding: 48px var(--pad-x-sm); }
  .csp-section-title { font-size: var(--text-h2); line-height: var(--leading-h2); }
  .csp-screenshots { grid-template-columns: 1fr; }
  .csp-nav { padding: 40px var(--pad-x-sm); flex-direction: column; align-items: flex-start; }
  .csp-nav-next { text-align: left; }
}
