/* Single case study: hero, facts, label rows, galleries, figures, quote, more work */

.od-cs-hero, .od-cs-block, .od-cs-more {
	--cs-gap: clamp(100px, 85.1px + 3.81vw, 140px);   /* rhythm between blocks: 100 / 120 / 140 */
	--cs-fade: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.6) 26.923%, rgba(0, 0, 0, 0.4) 56.25%, rgba(0, 0, 0, 0) 100%);
}

/* Hero: inset photo with the title block at its foot */
.od-cs-hero { padding: var(--od-header-h) var(--od-gutter) 0; }
.od-cs-hero__media { position: relative; display: flex; align-items: flex-end; min-height: clamp(648px, 58.9vw, 848px); overflow: hidden; background: var(--od-grey-900); color: var(--od-white); }
.od-cs-hero__media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.od-cs-hero__media::after { content: ""; position: absolute; inset: auto 0 0; height: max(400px, 70%); background: var(--cs-fade); pointer-events: none; }
.od-cs-hero__body { position: relative; z-index: 1; width: 100%; max-width: calc(var(--od-content) + 2 * (var(--od-inset) - var(--od-gutter))); margin: 0 auto; padding: 120px max(var(--od-gutter), calc(var(--od-inset) - var(--od-gutter))) var(--od-gutter); }
.od-cs-hero__eyebrow { font-size: var(--od-fs-b4); line-height: 1.6; text-transform: uppercase; color: var(--od-grey-100); margin-bottom: 16px; }
.od-cs-hero__titlerow { display: flex; align-items: flex-end; gap: var(--od-gutter); font-size: var(--od-fs-h1); }
.od-cs-hero__title { flex: 0 1 auto; min-width: 0; max-width: 1000px; font-size: inherit; line-height: 1.1; font-weight: 500; letter-spacing: var(--od-track-display); text-wrap: balance; overflow-wrap: break-word; }
.od-cs-hero__rule { flex: 1 1 0; min-width: 0; height: 1px; margin-bottom: 0.55em; background: rgba(210, 210, 210, 0.6); }
.od-cs-hero__lead { font-size: var(--od-fs-h6); line-height: 1.4; font-weight: 500; color: var(--od-grey-100); max-width: 800px; margin-top: 12px; }

/* Facts */
.od-cs-facts { display: grid; grid-template-columns: repeat(6, minmax(0, auto)); justify-content: space-between; gap: 32px; max-width: var(--od-content); margin: 0 auto; padding: var(--od-gutter) calc(var(--od-inset) - var(--od-gutter)) 0; box-sizing: content-box; }
.od-cs-facts__item { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.od-cs-facts dt { font-size: var(--od-fs-b3); line-height: 1.6; color: var(--od-grey-400); }
.od-cs-facts dd { margin: 0; font-size: var(--od-fs-b2); line-height: 1.6; font-weight: 500; color: var(--od-grey-900); overflow-wrap: break-word; }
.od-cs-facts .od-link { color: inherit; }
.od-cs-facts .od-link:hover { color: var(--od-brand); }
.od-cs-facts .od-btn { font-size: var(--od-fs-btn); color: var(--od-black); white-space: normal; overflow-wrap: anywhere; }
.od-cs-facts span.od-btn { cursor: default; }
.od-cs-facts span.od-btn:hover::before { margin-right: 0; }

/* Content blocks: label on the left, text on the right */
.od-cs-block { max-width: var(--od-content); margin: 0 auto; padding: var(--cs-gap) var(--od-inset) 0; box-sizing: content-box; }
.od-cs-block--last { padding-bottom: var(--cs-gap); }
.od-cs-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: start; }
.od-cs-row > .od-label { margin: 0; padding-top: 8px; }
.od-cs-row__body { margin: 0; min-width: 0; }
.od-cs-lead { font-size: var(--od-fs-h6); line-height: 1.4; font-weight: 500; color: var(--od-grey-900); }
.od-cs-text { font-size: var(--od-fs-b1); line-height: 1.6; color: var(--od-grey-600); margin-top: 24px; }
.od-cs-sub { font-size: var(--od-fs-b2); line-height: 1.6; font-weight: 500; color: var(--od-grey-900); margin-top: 32px; }
.od-cs-goals { margin: 12px 0 0; padding: 0; list-style: none; border-bottom: 1px solid var(--od-grey-200); }
.od-cs-goals li { position: relative; padding: 16px 0 16px 24px; border-top: 1px solid var(--od-grey-200); font-size: var(--od-fs-b2); line-height: 1.6; color: var(--od-grey-700); }
.od-cs-goals li::before { content: ""; position: absolute; left: 0; top: calc(16px + 0.8em - 4px); width: 8px; height: 8px; border-radius: 50%; background: var(--od-brand); }

.od-cs-approach { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; margin: 32px 0 0; padding: 0; list-style: none; }
.od-cs-approach li { padding-top: 20px; border-top: 1px solid var(--od-grey-200); }
.od-cs-approach h3 { font-size: var(--od-fs-b1); line-height: 1.4; font-weight: 500; color: var(--od-grey-900); }
.od-cs-approach p { font-size: var(--od-fs-b3); line-height: 1.6; color: var(--od-grey-600); margin-top: 8px; }

/* Galleries (square corners, cover crops) */
.od-cs-pair, .od-cs-mosaic, .od-cs-wide { margin: var(--cs-gap) 0 0; }
.od-cs-pair, .od-cs-mosaic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.od-cs-pair figure, .od-cs-mosaic figure { margin: 0; min-height: 0; }
.od-cs-pair .od-media { aspect-ratio: 592 / 800; }
.od-cs-mosaic { grid-template-rows: repeat(2, minmax(0, 1fr)); aspect-ratio: 1200 / 800; }
.od-cs-mosaic__c { grid-column: 2; grid-row: 1 / 3; }
.od-cs-wide { aspect-ratio: 3 / 2; }

/* Figures */
.od-cs-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 32px 0 0; padding: 0; list-style: none; }
.od-cs-figures li { display: flex; flex-direction: column; padding: 0 20px; border-left: 1px solid var(--od-grey-200); }
.od-cs-figures li:first-child { padding-left: 0; border-left: 0; }
.od-cs-figures li:last-child { padding-right: 0; }
.od-cs-figures__value { font-size: var(--od-fs-h2); line-height: 1.2; font-weight: 600; color: var(--od-black); white-space: nowrap; font-variant-numeric: tabular-nums; }
.od-cs-figures__value span { margin-left: 4px; font-size: 0.8125em; color: var(--od-grey-500); }
.od-cs-figures__label { font-size: var(--od-fs-b3); line-height: 1.6; font-weight: 500; color: var(--od-grey-700); margin-top: 8px; }

/* Quote */
.od-cs-quote { position: relative; }
.od-cs-quote::before { content: ""; position: absolute; right: calc(100% + 44px); top: 0; width: 56px; height: 56px; background: url("../../img/case-study-icon-quote.svg") no-repeat center / contain; }
.od-cs-quote blockquote { margin: 0; }
.od-cs-quote blockquote p { font-size: var(--od-fs-h5); line-height: 1.4; font-weight: 500; color: var(--od-grey-200); }
.od-cs-quote blockquote strong { font-weight: inherit; color: var(--od-grey-900); }
.od-cs-quote__author { display: flex; align-items: center; gap: 12px; margin-top: 32px; }
.od-cs-quote__author img { flex: none; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.od-cs-quote__name, .od-cs-quote__role { display: block; }
.od-cs-quote__name { font-size: var(--od-fs-b2); line-height: 1.6; font-weight: 500; color: var(--od-grey-800); }
.od-cs-quote__role { font-size: var(--od-fs-b4); line-height: 1.6; color: var(--od-grey-500); }

/* More work */
.od-cs-more { max-width: var(--od-content); margin: 0 auto; padding: 200px var(--od-inset); box-sizing: content-box; }
.od-cs-more__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(48px, 42px + 1.52vw, 64px); }
.od-cs-more__head > div { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: 600px; }
.od-cs-more__head .od-label { margin: 0; }
.od-cs-more__text { margin: 0; font-size: var(--od-fs-b2); line-height: 1.6; font-weight: 500; color: var(--od-grey-600); }
.od-cs-more__head .od-btn { flex: none; color: var(--od-black); }
.od-cs-more__grid { margin: 0; }
.od-work--more { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 0; list-style: none; }
.od-work--more .od-work-card { min-width: 0; }
.od-work--more .od-work-card__link { position: relative; display: flex; align-items: flex-end; aspect-ratio: 590 / 600; overflow: hidden; background: var(--od-grey-900); color: var(--od-white); text-decoration: none; }
.od-work--more .od-work-card__link:focus-visible { outline: 2px solid var(--od-brand); outline-offset: 4px; }
.od-work--more .od-work-card__media { position: absolute; inset: 0; aspect-ratio: auto; background: var(--od-grey-900) center / cover no-repeat; transition: transform 0.8s var(--od-ease); }
.od-work--more .od-work-card__media img { width: 100%; height: 100%; object-fit: cover; }
.od-work--more .od-work-card__media::after { content: ""; position: absolute; inset: auto 0 0; height: 62%; background: var(--cs-fade); pointer-events: none; }
/* Cards without a cover yet: sample photos stand in, the text placeholder is hidden */
.od-work--more .od-media__placeholder { display: none; }
.od-work--more .od-work-card:nth-child(4n + 1) .od-work-card__media:has(.od-media__placeholder) { background-image: url("../../img/case-study-more-evolva.webp"); }
.od-work--more .od-work-card:nth-child(4n + 2) .od-work-card__media:has(.od-media__placeholder) { background-image: url("../../img/case-study-more-aeroone.webp"); }
.od-work--more .od-work-card:nth-child(4n + 3) .od-work-card__media:has(.od-media__placeholder) { background-image: url("../../img/case-study-more-immersia-realm.webp"); }
.od-work--more .od-work-card:nth-child(4n + 4) .od-work-card__media:has(.od-media__placeholder) { background-image: url("../../img/case-study-more-urban-pulse.webp"); }
.od-work--more .od-work-card__body { position: relative; z-index: 1; width: 100%; gap: 8px; padding: clamp(20px, 12.6px + 1.9vw, 40px); }
.od-work--more .od-work-card__meta { order: -1; font-size: var(--od-fs-b2); line-height: 1.6; font-weight: 500; color: var(--od-white); }
.od-work--more .od-work-card__title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: var(--od-fs-h4); line-height: 1.2; font-weight: 600; text-wrap: balance; }
.od-work--more .od-work-card__year { font-size: var(--od-fs-b2); line-height: 1.6; font-weight: 500; color: var(--od-white); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.od-work--more .od-work-card__link:hover .od-work-card__media,
	.od-work--more .od-work-card__link:focus-visible .od-work-card__media { transform: scale(1.04); }
}
.od-work--more .od-work-card__link:hover .od-work-card__media img, .od-work--more .od-work-card__link:focus-visible .od-work-card__media img { transform: none; }

@media (max-width: 1024px) {
	.od-cs-hero__media { min-height: clamp(436px, 80vw, 648px); }
	.od-cs-hero__body { padding-top: 96px; }
	.od-cs-hero__media::after { height: 85%; }
	.od-cs-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); justify-content: stretch; }
	.od-cs-quote::before { right: calc(100% + 24px); width: 48px; height: 48px; }
	.od-work--more .od-work-card__link { aspect-ratio: 363 / 450; }
}

@media (max-width: 600px) {
	.od-cs-hero__rule { display: none; }
	.od-cs-hero__media::after { height: 100%; background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), var(--cs-fade); }
	.od-cs-hero__body { padding-top: 72px; }
	.od-cs-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.od-cs-facts__item--wide { grid-column: 1 / -1; }
	.od-cs-row { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.od-cs-row > .od-label { padding-top: 0; }
	.od-cs-pair, .od-cs-mosaic { grid-template-columns: minmax(0, 1fr); }
	.od-cs-pair .od-media { aspect-ratio: 350 / 400; }
	.od-cs-mosaic { grid-template-rows: none; aspect-ratio: auto; }
	.od-cs-mosaic__a, .od-cs-mosaic__b { aspect-ratio: 350 / 250; }
	.od-cs-mosaic__c { grid-column: auto; grid-row: auto; aspect-ratio: 350 / 400; }
	.od-cs-wide { aspect-ratio: 350 / 400; }
	.od-cs-approach { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.od-cs-figures { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	.od-cs-figures li, .od-cs-figures li:last-child { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--od-grey-200); }
	.od-cs-figures li:first-child { padding-top: 0; border-top: 0; }
	.od-cs-quote::before { position: static; display: block; width: 44px; height: 44px; margin-bottom: 20px; }
	.od-cs-quote__author img { width: 48px; height: 48px; }
	.od-cs-more__head { flex-direction: column; align-items: flex-start; gap: 16px; }
	.od-work--more { grid-template-columns: minmax(0, 1fr); }
	.od-work--more .od-work-card__link { aspect-ratio: 350 / 380; }
}
