/* Case study pages (site/work/<slug>/). Built on the main styles.css tokens.
   --tint is set per project on <body>, from site/work/cases.json. */

.case-page { background: var(--carbon); }

/* Header: logo on the left, "All case studies" and the project button on the right */
.case-header-nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.case-header-link { color: var(--ash); font-weight: 500; text-decoration: none; }
.case-header-link:hover { color: var(--paper); }
@media (max-width: 560px) { .case-header-link { display: none; } }

/* Intro */
.case-hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(40px, 7vw, 96px)) 0 clamp(40px, 5vw, 64px);
  background: radial-gradient(ellipse 70% 90% at 15% 0%, color-mix(in srgb, var(--tint) 22%, transparent), transparent 70%);
}
.case-back {
  display: flex; width: fit-content; align-items: center; gap: 8px;
  margin-bottom: clamp(28px, 4vw, 48px);
  color: var(--ash); font-weight: 600; text-decoration: none;
}
.case-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: translate .25s var(--ease); }
.case-back:hover { color: var(--paper); }
.case-back:hover svg { translate: -3px 0; }

.case-type { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 16px; color: var(--ash); font-weight: 600; }
.case-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--tint); }
.case-hero h1 { max-width: 18ch; margin: 0; font: 700 clamp(2.2rem, 1rem + 4.4vw, 4.75rem)/1.04 var(--font-display); letter-spacing: -.035em; text-wrap: balance; }
.case-summary { max-width: 58ch; margin: 24px 0 0; color: #cfcec7; font-size: var(--step-1); line-height: 1.55; }

.case-meta { display: flex; flex-wrap: wrap; gap: 16px 48px; margin: 36px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.case-meta dt { margin-bottom: 4px; color: var(--lime); font-size: var(--step--1); font-weight: 600; }
.case-meta dd { margin: 0; font-weight: 500; }

/* Concept projects: a label next to the type, and one honest line under the summary */
.case-concept {
  margin-left: 6px;
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--paper);
  font-size: .8125rem;
}
.case-concept-note { max-width: 58ch; margin: 14px 0 0; color: var(--ash); font-size: .9375rem; font-style: italic; }

/* The story: label on the left, text on the right */
.case-story { padding-bottom: clamp(40px, 5vw, 72px); }
.case-story-row {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 16px 48px;
  padding: clamp(24px, 3vw, 40px) 0;
  border-top: 1px solid var(--line);
}
.case-story-row h2 { margin: 0; font: 600 var(--step-1)/1.3 var(--font-display); letter-spacing: -.01em; color: var(--paper); }
.case-story-row h2::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 12px; border-radius: 3px; background: var(--tint); vertical-align: .1em; }
.case-story-text { display: grid; gap: 1em; max-width: 62ch; }
.case-story-text p { margin: 0; color: #d7d6cf; font-size: var(--step-1); line-height: 1.65; }
.case-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.case-chips li { padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; font-weight: 600; font-size: .9375rem; }
@media (max-width: 760px) { .case-story-row { grid-template-columns: 1fr; } }

/* The project images, one after another. Long pages arrive as stacked slices with no seam. */
.case-gallery { padding-bottom: clamp(48px, 6vw, 96px); }
.case-gallery .wrap { display: grid; gap: clamp(16px, 2vw, 28px); }
.case-shot { margin: 0; overflow: hidden; border-radius: clamp(12px, 1.4vw, 20px); background: #1f1f1d; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.case-shot img { display: block; width: 100%; height: auto; }

/* Phone screens: shown at phone size, side by side and centred, never stretched to the page width */
.case-phones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 300px));
  justify-content: center;
  align-items: start;
  gap: clamp(16px, 2.4vw, 32px);
  padding: clamp(24px, 4vw, 56px);
  border-radius: clamp(12px, 1.4vw, 20px);
  background: radial-gradient(ellipse at 50% 0, color-mix(in srgb, var(--tint) 14%, transparent), transparent 70%), #1a1a19;
  border: 1px solid rgba(255, 255, 255, .06);
}
.case-shot.is-phone { border-radius: 22px; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
@media (max-width: 560px) {
  .case-phones { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; gap: 12px; }
  .case-shot.is-phone { border-radius: 14px; }
}

/* Contact box */
.case-cta { padding-bottom: clamp(48px, 6vw, 96px); }
.case-cta-card {
  display: grid;
  justify-items: start;
  gap: 16px;
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: radial-gradient(circle at 100% 0, rgba(199, 255, 61, .12), transparent 55%), #1b1b1a;
}
.case-cta-card h2 { max-width: 20ch; margin: 0; font: 700 clamp(1.8rem, 1rem + 2.6vw, 3.25rem)/1.08 var(--font-display); letter-spacing: -.03em; }
.case-cta-card p { max-width: 50ch; margin: 0; color: var(--ash); font-size: var(--step-1); }
.case-cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 12px; }

/* Next case study */
.case-next { padding-bottom: clamp(56px, 7vw, 112px); }
.case-next-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--paper);
  text-decoration: none;
  background: linear-gradient(120deg, color-mix(in srgb, var(--tint) 16%, #1b1b1a), #1b1b1a 60%);
  transition: border-color .25s var(--ease), translate .25s var(--ease);
}
.case-next-link:hover { border-color: var(--line-strong); translate: 0 -3px; }
.case-next-text { display: grid; gap: 6px; }
.case-next-label { color: var(--lime); font-size: var(--step--1); font-weight: 600; }
.case-next-title { font: 600 clamp(1.25rem, 1rem + 1.2vw, 2rem)/1.15 var(--font-display); letter-spacing: -.02em; }
.case-next-type { color: var(--ash); }
.case-next-thumb { width: clamp(120px, 18vw, 220px); aspect-ratio: 4 / 3; overflow: hidden; border-radius: 12px; }
.case-next-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.case-next-arrow { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--lime); color: var(--carbon); }
.case-next-arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: translate .25s var(--ease); }
.case-next-link:hover .case-next-arrow svg { translate: 3px 0; }
@media (max-width: 600px) {
  .case-next-link { grid-template-columns: minmax(0, 1fr) auto; }
  .case-next-thumb { display: none; }
}


