/* ============================================================
   Case study page styles — loaded only on /work/olive-and-ember/
   Shares tokens and base rules with css/style.css.
   ============================================================ */

/* ---------- Case hero ---------- */
.case-hero {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2.5rem, 5vw, 3.5rem);
}

.case-crumbs {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.case-crumbs a {
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.case-crumbs a:hover {
  color: var(--color-ink);
}

.case-crumbs li {
  display: inline;
}

.case-crumbs li + li::before {
  content: "/";
  margin: 0 0.5rem;
  color: var(--color-border-strong);
}

.case-eyebrow {
  margin-top: 1.5rem;
}

.case-title {
  margin-top: 1.25rem;
  font-family: var(--font-serif);
  font-size: clamp(2.125rem, 1.45rem + 3vw, 3.25rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.case-lead {
  margin-top: 1.25rem;
  max-width: 44rem;
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.1875rem);
  line-height: 1.6;
  color: var(--color-muted);
}

.case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: 2rem;
}

.case-facts {
  margin-top: 2.5rem;
  border-top: 1px solid var(--color-border);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.case-facts > div {
  padding: 1rem 1.25rem 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.case-facts dt {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
}

.case-facts dd {
  margin-top: 0.375rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.case-figure {
  margin: clamp(2rem, 4vw, 3rem) auto 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  overflow: hidden;
  box-shadow: var(--shadow-media);
}

.case-figure img {
  width: 100%;
  height: auto;
}

.case-figure figcaption {
  padding: 0.875rem 1.125rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-muted);
}

/* ---------- Case body ---------- */
.case-body {
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
}

.case-index {
  margin-bottom: clamp(2rem, 4vw, 3rem);
  padding: 1.25rem 1.375rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}

.case-index__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-muted);
}

.case-index__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 0.875rem;
}

.case-index__list a {
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--color-ink);
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.case-index__list a:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.case-section {
  padding-top: clamp(2rem, 4vw, 2.75rem);
  margin-top: clamp(2rem, 4vw, 2.75rem);
  border-top: 1px solid var(--color-border);
  max-width: 46rem;
}

.case-section:first-of-type {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.case-section h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 1.3rem + 1vw, 1.9375rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.case-section h3 {
  margin-top: 1.75rem;
  font-size: 1.0625rem;
  font-weight: 600;
}

.case-section p {
  margin-top: 1rem;
  line-height: 1.7;
}

.case-section code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 0.1em 0.35em;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

.case-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.case-list li {
  position: relative;
  padding-left: 1.375rem;
  line-height: 1.65;
}

.case-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 1px;
  background: var(--color-accent);
}

.case-list strong {
  font-weight: 600;
}

/* ---------- Case footer nav ---------- */
.case-next {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: clamp(2rem, 4vw, 2.5rem);
  border-top: 1px solid var(--color-border);
  max-width: 46rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.case-next p {
  font-size: 0.9375rem;
  color: var(--color-muted);
}
