/* ══════════════════════════════════════════════
   DETAIL PAGE — Project Case Study Layout
   Shared across all project pages.
   Design tokens and nav styles live in each
   page's inline <style> (same as work.html).
══════════════════════════════════════════════ */


/* ── Two-panel layout ───────────────────────── */

.detail-layout {
  display: grid;
  grid-template-columns: 245px 1fr;
  /* left side bar width 左侧bar宽度 */
  flex: 1;
  min-height: 0;
  overflow: hidden;
}


/* ── Left sidebar ───────────────────────────── */

.detail-sidebar {
  overflow: visible;
}

.sidebar-inner {
  position: sticky;
  top: 0;
  padding: 44px 24px 48px 32px;
  display: flex;
  flex-direction: column;
}

/* Back link */
.sidebar-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 400;
  color: var(--c-ink-45);
  letter-spacing: 0.01em;
  margin-bottom: 40px;
  margin-left: -2px; /* optically align arrow tip with text below */
  transition: color var(--dur-fast) var(--ease-out);
}
.sidebar-back:hover { color: var(--c-ink-90); }
.sidebar-back svg { display: block; flex-shrink: 0; }

/* Project meta */
.sidebar-cat {
  font-size: 11px;
  font-weight: 400;
  color: var(--c-ink-45);
  letter-spacing: 0;
  margin-bottom: 8px;
}

/* Project title */
.sidebar-title {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--c-ink-90);
  line-height: 1.4;
  margin-bottom: 32px;
}

/* Divider */
.sidebar-divider {
  height: 1px;
  background: var(--c-border);
  margin-bottom: 24px;
}

/* ── Section index ── */

.sidebar-index {
  display: flex;
  flex-direction: column;
}

/* 左侧 left bar 细节调整 */
.sidebar-link {
  display: block;
  font-size: 12.5px;
  font-weight: 300;
  color: var(--c-ink-45);
  letter-spacing: 0;
  line-height: 1;
  padding: 11px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--dur-fast) var(--ease-out);
}

.sidebar-link:hover { color: var(--c-ink-70); }

.sidebar-link.is-active {
  color: var(--c-ink-90);
  font-weight: 400;
}


/* ── Main content ───────────────────────────── */

.detail-content {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}

/* Hero cover — left-aligned with section text */
.detail-cover {
  display: block;
  margin: 72px 48px 0 28px;
  width: calc(100% - 76px);
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  flex-shrink: 0;
}

/* Inner wrapper — vertical spacing only */
.detail-inner {
  padding: 0 0 96px;
}


/* ── Sections ───────────────────────────────── */

.detail-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 35px;
  padding-top: 72px;
  padding-bottom: 72px;
  padding-left: 28px;
  padding-right: 48px;
}

.detail-section:last-child {
  border-bottom: none;
}

/* Left column: label + heading */
.detail-section__left {
  display: flex;
  flex-direction: column;
}

.detail-section__label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-ink-45);
  margin-bottom: 16px;
}

.detail-section__heading {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--c-ink-90);
  line-height: 1.25;
}

/* Right column: body text */
.detail-section__right {
  padding-top: 2px; /* optical align to heading cap-height */
  padding-left: 48px;
  text-align: right;
}

.detail-section__body {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.8;
  color: var(--c-ink-70);
  text-align: left;
}

/* Placeholder style — remove when real content added */
.detail-section__body.is-placeholder {
  color: var(--c-ink-20);
  font-style: italic;
}

/* Media block — spans both columns, aligned with title edge */
.detail-section__media {
  grid-column: 1 / -1;
  margin-top: 32px;
}

/* Canvas — full-bleed, no padding, no radius */
.detail-canvas {
  background: var(--c-ink-08);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
}

/* Placeholder inside canvas */
.detail-img-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background: #e2e2e2;
  display: block;
  overflow: hidden;
}

/* Real image when added */
.detail-canvas img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  object-fit: cover;
  display: block;
  overflow: hidden;
}

/* Caption below media */
.detail-caption {
  text-align: center;
  font-size: 12px;
  font-weight: 400;
  color: var(--c-ink-45);
  margin-top: 14px;
  letter-spacing: 0;
}


/* ── Cover color themes (mirrors work.css) ─── */

.cover-cider-qc    { background: linear-gradient(155deg, #ECE7DF 0%, #DDD4C6 100%); }
.cover-dreamwriter { background: linear-gradient(155deg, #DCE5EC 0%, #C8D4E0 100%); }
.cover-adobe       { background: linear-gradient(155deg, #ECE1DE 0%, #E0CECC 100%); }
.cover-cider-size  { background: linear-gradient(155deg, #DCECe4 0%, #C8E0D4 100%); }
.cover-motion      { background: linear-gradient(155deg, #252525 0%, #181818 100%); }
.cover-motion-toys { background: linear-gradient(155deg, #DDE0EE 0%, #CDD2E8 100%); }
.cover-vibe        { background: linear-gradient(155deg, #E8E4F0 0%, #D8D0EA 100%); }
