/* ═══════════════════════════════════════════════════════════════
   CASE STUDY — two UI directions
   ═══════════════════════════════════════════════════════════════
   Loads after css/style.css and css/page-kit.css.

   §1 is shared by both directions and is the actual template — a third case
   study should be able to use it unchanged. §2 and §3 are the two skins under
   evaluation; once one is chosen, delete the other and fold the winner's
   rules into §1.

   Note: css/case-study.css already exists and belongs to the older Arbor
   pages. This is a separate file on purpose; do not merge them.

   §1  Shared case-study furniture
   §2  Direction A — Editorial
   §3  Direction B — Cinematic
   §4  Variant switcher (prototype chrome)
   §5  Responsive
   ═══════════════════════════════════════════════════════════════ */

/* ═══ §1  SHARED ══════════════════════════════════════════════ */

.wc-breadcrumb {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 1.5rem;
}
.wc-breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.wc-breadcrumb li + li::before { content: '/'; margin-right: 0.5rem; opacity: 0.4; }
.wc-breadcrumb a { color: rgba(255, 255, 255, 0.6); }
.wc-breadcrumb a:hover { color: var(--primary-lift); }

/* Project facts. A case study that does not say who, what and where is a blog
   post with pictures. */
.wc-facts {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.wc-fact { padding: 1.125rem clamp(1rem, 2.5vw, 1.5rem); background: var(--bg); }
.wc-fact dt {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 0.4375rem;
}
.wc-fact dd {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

/* Body copy. Measure is capped in ch so it stays readable whatever the
   viewport does. */
.wc-prose { max-width: 62ch; }
.wc-prose p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.72);
}
.wc-prose p + p { margin-top: 1.25rem; }
.wc-prose h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2.125rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin-bottom: 1.25rem;
}
.wc-prose h2 + p { margin-top: 0; }

.wc-figure { margin: 0; }
.wc-figure img { width: 100%; height: auto; display: block; }
.wc-figure figcaption {
  margin-top: 0.75rem;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.wc-pull {
  border-left: 2px solid var(--primary);
  padding-left: clamp(1.25rem, 3vw, 2rem);
  margin-block: clamp(2rem, 4vw, 3rem);
  max-width: 44ch;
}
.wc-pull p {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: #fff;
}

.wc-pull cite {
  display: block;
  margin-top: 0.875rem;
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

/* The triangle from the content plan: every case study links back to its
   service and its industry, so nothing is an orphan. */
.wc-related {
  display: grid;
  gap: 1rem;
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--border);
}
.wc-relcard {
  display: block;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.25s, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.wc-relcard:hover { border-color: var(--primary); transform: translateY(-3px); }
.wc-relcard .eyebrow { margin-bottom: 0.625rem; }
.wc-relcard h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.01em;
  margin-bottom: 0.5rem;
}
.wc-relcard p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
}


/* The film sits where the hero still would. It reuses the homepage facade
   (.work-thumb + .work-play, handled in js/main.js), so every film on the
   site plays the same way. */
.wc-filmwrap { margin-top: clamp(2.5rem, 5vw, 4rem); }
.wc-film-cap {
  margin-top: 0.75rem;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}


/* ═══ §2  DIRECTION A — EDITORIAL ═════════════════════════════ */
/*  Reads like a magazine feature. A sticky rail carries the project facts and
    section nav, prose runs at a comfortable measure, and full-bleed images
    break the sections. Favours the copy, which for this piece is genuinely
    essayistic.                                                              */

.ed-hero { padding-top: 7.5rem; background: var(--bg); }
.ed-hero-inner { max-width: 52rem; }
.ed-eyebrow-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.ed-tag {
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.ed-h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: 0.01em;
  text-wrap: balance;
  margin-bottom: 1.25rem;
}
.ed-standfirst {
  font-size: clamp(1.0625rem, 1.6vw, 1.3125rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.68);
  max-width: 44rem;
}

.ed-heroshot {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border-block: 1px solid var(--border);
}
.ed-heroshot img { width: 100%; height: auto; display: block; }

.ed-body { padding-block: clamp(3rem, 6vw, 5rem); }
.ed-layout { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }

.ed-rail { position: relative; }
.ed-rail-inner { position: sticky; top: 6rem; }
.ed-rail .wc-facts { margin-bottom: 1.5rem; }
.ed-toc { border-top: 1px solid var(--border); padding-top: 1.25rem; }
.ed-toc p {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 0.875rem;
}
.ed-toc ol { list-style: none; counter-reset: toc; }
.ed-toc li { counter-increment: toc; }
.ed-toc li + li { margin-top: 0.5rem; }
.ed-toc a {
  display: flex;
  gap: 0.625rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s;
}
.ed-toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--primary-lift);
  flex-shrink: 0;
}
.ed-toc a:hover { color: #fff; }

.ed-section + .ed-section { margin-top: clamp(3rem, 6vw, 5rem); }
.ed-section .wc-figure { margin-top: clamp(1.75rem, 4vw, 2.5rem); }

/* Two-up detail pairing inside the prose column. */
.ed-pair { display: grid; gap: 1rem; margin-top: clamp(1.75rem, 4vw, 2.5rem); }

/* Full-bleed break between chapters. */
.ed-break {
  margin-block: clamp(3rem, 7vw, 5.5rem);
  border-block: 1px solid var(--border);
}
.ed-break img { width: 100%; height: auto; display: block; }
.ed-break figcaption {
  padding: 0.75rem clamp(1.5rem, 5vw, 4rem);
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}


/* ═══ §3  DIRECTION B — CINEMATIC ═════════════════════════════ */
/*  Image-first. Full-viewport opener, edge-to-edge frames, copy set in
    tighter offset blocks between visual moments. Reads like a lookbook and
    favours the photography over the prose.                                  */

.cn-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bg);
}
.cn-hero-media { position: absolute; inset: 0; }
.cn-hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cn-hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  /* The vehicle is a pale stone colour, so white type over the bonnet needs a
     heavier foot to the scrim than a dark subject would. */
  background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.1) 28%, rgba(0,0,0,0.72) 66%, rgba(0,0,0,0.95) 100%);
}
.cn-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: clamp(3rem, 7vw, 5rem);
}
.cn-h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.25rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
  max-width: 18ch;
  margin-bottom: 1.25rem;
}
.cn-standfirst {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
  max-width: 40rem;
}
.cn-scroll {
  position: absolute;
  right: clamp(1.5rem, 5vw, 4rem);
  bottom: clamp(3rem, 7vw, 5rem);
  z-index: 2;
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  writing-mode: vertical-rl;
}

.cn-facts-bar {
  border-block: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.cn-facts-bar .wc-facts {
  border: 0;
  border-radius: 0;
  background: transparent;
  gap: 0;
}
.cn-facts-bar .wc-fact {
  background: transparent;
  border-bottom: 1px solid var(--hairline);
  padding-inline: 0;
}
.cn-facts-bar .wc-fact:last-child { border-bottom: 0; }

/* Copy blocks sit offset rather than centred, so the page never feels like a
   text document with pictures dropped in. */
.cn-chapter { padding-block: clamp(3.5rem, 8vw, 6rem); }
.cn-chapter-grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.cn-chapter-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--primary-lift);
  margin-bottom: 1rem;
}
.cn-chapter h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.625rem, 3vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}

/* Full-bleed frames, escaping the container. */
.cn-bleed { position: relative; }
.cn-bleed img { width: 100%; height: auto; display: block; }
.cn-bleed--tall img { max-height: 90svh; object-fit: cover; }
.cn-bleed figcaption {
  position: absolute;
  left: clamp(1.5rem, 5vw, 4rem);
  bottom: 1rem;
  padding: 0.3125rem 0.625rem;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

/* Portrait details side by side at full bleed run enormously tall unless the
   row height is pinned, since height:100% on an auto-height row resolves to
   auto. Cap it and let object-fit crop. */
.cn-duo {
  display: grid;
  gap: 0.75rem;
  grid-auto-rows: min(52svh, 30rem);
}
.cn-duo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Colour-story strip, specific to this piece but reusable as a "palette"
   block on any case study with a strong art direction story. */
.cn-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr));
  gap: 1px;
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cn-swatch { padding: 1rem 0.875rem; }
.cn-swatch b {
  display: block;
  height: 2.5rem;
  margin-bottom: 0.75rem;
  border-radius: 2px;
}
.cn-swatch span {
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}


/* ═══ §4  VARIANT SWITCHER (prototype only) ═══════════════════ */

.wc-switch {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  max-width: calc(100vw - 2rem);
  overflow-x: auto;
  padding: 0.375rem 0.375rem 0.375rem 0.875rem;
  border-radius: 999px;
  background: rgba(10, 10, 16, 0.88);
  -webkit-backdrop-filter: blur(20px);
          backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.7);
  font-family: var(--font-body);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.wc-switch > span { color: rgba(255, 255, 255, 0.4); margin-right: 0.5rem; }
.wc-switch a {
  padding: 0.4375rem 0.75rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.wc-switch a:hover { background: rgba(255, 255, 255, 0.09); color: #fff; }
.wc-switch a.is-active { background: var(--primary); color: #fff; }

@media (max-width: 600px) {
  .wc-switch { font-size: 0.625rem; padding-left: 0.625rem; }
  .wc-switch > span { display: none; }
}


/* ═══ §5  RESPONSIVE ══════════════════════════════════════════ */

@media (min-width: 640px) {
  .wc-facts { grid-template-columns: repeat(2, 1fr); }
  .ed-pair { grid-template-columns: repeat(2, 1fr); }
  .cn-duo { grid-template-columns: repeat(2, 1fr); }
  .wc-related { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .ed-layout { grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); }
  .cn-chapter-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
  .cn-facts-bar .wc-facts { grid-template-columns: repeat(4, 1fr); }
  .cn-facts-bar .wc-fact {
    border-bottom: 0;
    border-right: 1px solid var(--hairline);
    padding-right: 1.5rem;
  }
  .cn-facts-bar .wc-fact:last-child { border-right: 0; }
}

@media (max-width: 899px) {
  .ed-rail-inner { position: static; }
  .ed-toc { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .wc-relcard { transition: none; }
  .wc-relcard:hover { transform: none; }
}
