/* ── CASE STUDY DETAIL PAGES ── */

/* Page header: flex layout to align title + back link */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.page-back {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  align-self: flex-end;
  padding-bottom: 0.2rem;
  transition: color 0.15s;
}
.page-back:hover { color: var(--text); }

/* ── CASE BODY ── */
.case-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4rem) var(--pad) clamp(4rem, 8vw, 6rem);
}

.case-hero-figure { margin: 0 0 clamp(2.5rem, 5vw, 4rem); }
.case-hero-figure img {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  margin: 0 auto;
}
.case-hero-figure figcaption {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: var(--faint);
  margin-top: 0.7rem;
}

.case-section + .case-section { margin-top: clamp(2.5rem, 5vw, 4rem); }
.case-section h2 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--warm);
  margin-bottom: 1.4rem;
}
.case-section h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 0.9rem;
}
.case-section p {
  font-size: 0.97rem;
  color: var(--text);
  line-height: 1.85;
  text-align: justify;
  hyphens: auto;
}
.case-section p + p { margin-top: 1rem; }
.case-section p + h3 { margin-top: 1.8rem; }
.case-section ul { list-style: none; margin-top: 0.5rem; }
.case-section ul li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.85;
}
.case-section ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--warm);
}

.case-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.25rem; }
.case-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  border: 1px solid var(--border);
  padding: 0.2rem 0.55rem;
  background: rgba(255,255,255,0.4);
}

.case-figure { margin: clamp(2rem, 4vw, 3rem) 0; }
.case-figure img {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  margin: 0 auto;
  border: 1px solid var(--border);
}
.case-figure figcaption {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: var(--faint);
  margin-top: 0.7rem;
  text-align: center;
}

.case-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  margin: clamp(2rem, 4vw, 3rem) 0;
}
.case-grid-2 .case-figure { margin: 0; }

.case-bottom-nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3rem) var(--pad);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.case-bottom-nav a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.15s;
}
.case-bottom-nav a:hover { color: var(--text); }

.case-figure-placeholder {
  width: 100%;
  aspect-ratio: 16 / 7;
  border: 1.5px dashed var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.case-figure-placeholder span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .case-grid-2 { grid-template-columns: 1fr; }
  .case-bottom-nav { flex-direction: column; align-items: stretch; gap: 0.85rem; }
}
