/**
 * Case study: page and one-page print sheet (templates/case-study.php).
 * Brand-swappable: every color, font and corner comes from the --cs-* variables that MVP_Case_Studies::brand_css()
 * writes from the brand settings. Nothing in this file names a brand color.
 * Contrast rules carried from BRAND.md: button text is the dark color on the accent; accent-colored TEXT on light
 * backgrounds uses --cs-accent-text; badges are --cs-badge-text on --cs-badge-bg.
 */

.cs {
	font-family: var(--cs-font-body);
	color: var(--cs-body);
}

/* No weight (:where), so buttons and links keep their own colors (dark text on the accent, never light). */
:where(.cs) a {
	color: inherit;
}

.cs-eyebrow {
	display: block;
	margin: 0 0 10px;
	font: 700 13px/1.2 var(--cs-font-body);
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--cs-accent-text);
}

.cs-eyebrow--h { /* "Built in phases" as the section heading. */
	margin-bottom: 24px;
}

.cs-h1 {
	margin: 0;
	font-family: var(--cs-font-display);
	font-weight: var(--cs-display-wt);
	text-transform: var(--cs-display-case);
	letter-spacing: 0;
	color: var(--cs-dark);
	font-size: clamp(48px, 6vw, 96px);
	line-height: 0.86;
}

.cs-place {
	margin: 12px 0 0;
	font-size: 17px;
	font-weight: 700;
	color: var(--cs-dark);
}

.cs-summary {
	margin: 6px 0 0;
	font-size: 16px;
	color: var(--cs-body);
}

.cs-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: var(--cs-radius);
	background: var(--cs-badge-bg);
	color: var(--cs-badge-text);
	font: 700 12px/1.3 var(--cs-font-body);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	vertical-align: middle;
}

/* Story: the need, what we built, the result. */
/* Kelsey's longer story under the intro (2026-10-13, D75). */
.cs-sec {
	margin: 32px 0 0;
}

.cs-sec__h {
	margin: 0 0 10px;
	font-family: var(--cs-font-display);
	font-weight: var(--cs-display-wt);
	text-transform: var(--cs-display-case);
	color: var(--cs-dark);
	font-size: clamp(26px, 2.6vw, 34px);
	line-height: 0.95;
}

.cs-sec p {
	margin: 0 0 12px;
	font-size: 17px;
	line-height: 1.6;
	color: var(--cs-body);
}

.cs-story {
	margin: 28px 0 0;
}

.cs-story__row {
	display: grid;
	grid-template-columns: 9em 1fr;
	gap: 16px;
	padding: 14px 0;
	border-top: 1.5px solid var(--cs-dark);
}

.cs-story dt {
	font: 700 12px/1.6 var(--cs-font-body);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--cs-dark);
}

.cs-story dd {
	margin: 0;
	font-size: 17px;
	line-height: 1.5;
}

/* Facts: a dark panel. */
.cs-facts {
	margin: 0;
	padding: 22px 24px;
	background: var(--cs-dark);
	color: var(--cs-body-on-dark);
	border-top: 3px solid var(--cs-accent);
}

.cs-facts__row {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 9px 0;
	border-bottom: 1px solid var(--cs-dark-line);
}

.cs-facts__row:last-child {
	border-bottom: 0;
}

.cs-facts dt {
	font: 700 12px/1.5 var(--cs-font-body);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--cs-light);
}

.cs-facts dd {
	margin: 0;
	text-align: right;
	font-size: 15px;
	color: var(--cs-light);
}

.cs-plans {
	margin: 18px 0 0;
	font-size: 15px;
}

.cs-plans a {
	font-weight: 700;
	color: var(--cs-dark);
	text-decoration: underline;
	text-decoration-color: var(--cs-accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.cs-quote {
	margin: 0;
}

.cs-quote p {
	margin: 0;
	font-size: 19px;
	line-height: 1.55;
}

.cs-quote footer {
	margin-top: 14px;
	font: 700 13px/1.2 var(--cs-font-body);
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--cs-accent);
}

.cs-btn {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 14px 22px;
	border: 2px solid transparent;
	border-radius: var(--cs-radius);
	font: 700 15px/1.1 var(--cs-font-body);
	text-decoration: none;
}

.cs-btn--primary {
	background: var(--cs-accent);
	border-color: var(--cs-accent);
	color: var(--cs-dark);
}

.cs-btn--primary:hover {
	background: var(--cs-accent-text);
	border-color: var(--cs-accent-text);
	color: var(--cs-light);
}

.cs-btn--outline {
	border-color: var(--cs-dark);
	color: var(--cs-dark);
}

.cs-btn--outline:hover {
	background: var(--cs-dark);
	color: var(--cs-light);
}

/* ---------- Phases (projects built in phases) ---------- */

.cs-h2 {
	margin: 0 0 28px;
	font-family: var(--cs-font-display);
	font-weight: var(--cs-display-wt);
	text-transform: var(--cs-display-case);
	color: var(--cs-dark);
	font-size: clamp(36px, 4vw, 56px);
	line-height: 0.9;
}

.cs-phases {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: phase;
}

.cs-phase {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 18px 20px 20px;
	background: var(--cs-white);
	border: 1.5px solid var(--cs-dark);
	border-top: 4px solid var(--cs-dark);
}

.cs-phase--in_progress,
.cs-phase--planned {
	border-top-color: var(--cs-badge-bg);
}

.cs-phase__label {
	margin: 0;
	font-family: var(--cs-font-display);
	font-weight: var(--cs-display-wt);
	text-transform: var(--cs-display-case);
	font-size: 26px;
	line-height: 1;
	color: var(--cs-dark);
}

.cs-phase__label .cs-badge {
	margin-left: 6px;
	font-family: var(--cs-font-body);
}

.cs-phase__note {
	margin: 0;
	font-weight: 700;
	color: var(--cs-dark);
}

.cs-phase__facts {
	margin: 0;
}

.cs-phase__facts div {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 6px 0;
	border-top: 1px solid var(--cs-light-2);
	font-size: 14px;
}

.cs-phase__facts dt {
	font: 700 11px/1.6 var(--cs-font-body);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--cs-dark);
	white-space: nowrap;
}

.cs-phase__facts dd {
	margin: 0;
	text-align: right;
}

.cs-phase .mvp-figure img,
.cs-phase .mvp-placeholder {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

/* ---------- Page ---------- */

.cs--page {
	background: var(--cs-light);
}

.cs-hero .mvp-figure img,
.cs-hero .mvp-placeholder {
	display: block;
	width: 100%;
	height: clamp(280px, 42vw, 1000px); /* Row 37: was capped at 640px, about 4:1 at 2560 wide; now about 2.6:1, so a whole development stays in frame. */
	object-fit: cover;
	aspect-ratio: auto;
}

.cs-intro {
	padding: 56px 0 72px;
}

.cs-intro__grid {
	display: grid;
	grid-template-columns: 1.6fr 1fr;
	gap: 56px;
	align-items: start;
}

.cs-download {
	margin: 28px 0 0;
}

.cs-band {
	padding: 72px 0;
}

.cs-band--light {
	background: var(--cs-light-2);
}

.cs-band--dark {
	background: var(--cs-dark);
	color: var(--cs-body-on-dark);
}

.cs-band--dark .cs-quote p {
	color: var(--cs-light);
}

.cs-floorplan {
	max-width: 900px;
	padding: 24px;
	background: var(--cs-white);
	border: 1.5px solid var(--cs-dark);
}

.cs-gallery {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}

.cs-gallery .mvp-figure img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

.cs-cta {
	padding: 48px 0;
	text-align: center;
}

@media (max-width: 900px) {
	.cs-intro__grid {
		grid-template-columns: 1fr;
		gap: 32px;
	}
}

@media (max-width: 600px) {
	.cs-story__row {
		grid-template-columns: 1fr;
		gap: 4px;
	}
	.cs-gallery {
		grid-template-columns: 1fr;
	}
	.cs-intro {
		padding: 36px 0 48px;
	}
}

/* ---------- Print: one letter-size page ---------- */

@page {
	size: letter;
	margin: 0;
}

.cs-print-body {
	margin: 0;
	background: #808080;
}

.cs--print {
	-webkit-print-color-adjust: exact;
	print-color-adjust: exact;
}

.cs-sheet {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 8.5in;
	height: 11in;
	margin: 0 auto;
	overflow: hidden;
	background: var(--cs-light);
}

.cs-sheet__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.4in; /* A long eyebrow wraps clear of the logo (Tributary). Cody A Smith LLC patch, 2026-10-15. */
	padding: 0.26in 0.5in;
	background: var(--cs-dark);
}

.cs-sheet__top .cs-eyebrow {
	margin: 0;
	text-align: right; /* Wrapped lines stay right-aligned, like the one-line eyebrows. Same patch. */
	text-wrap: balance; /* And break into two even lines. Same patch. */
	color: var(--cs-accent);
}

.cs-sheet__logo {
	display: block;
	height: 0.52in;
	width: auto;
}

.cs-sheet__hero .mvp-figure img,
.cs-sheet__hero .mvp-placeholder {
	display: block;
	width: 100%;
	height: 2.95in;
	object-fit: cover;
	aspect-ratio: auto;
}

/* A sheet with a phase timeline gives the hero a little less room. */
.cs-sheet--phases .cs-sheet__hero .mvp-figure img,
.cs-sheet--phases .cs-sheet__hero .mvp-placeholder {
	height: 2.68in;
}

.cs-sheet__title {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 0.2in;
	padding: 0.28in 0.5in 0;
}

.cs--print .cs-h1 {
	font-size: 46px;
}

.cs--print .cs-place {
	margin-top: 6px;
	font-size: 14px;
}

.cs-sheet__body {
	display: grid;
	grid-template-columns: 1fr 2.55in;
	gap: 0.3in;
	flex: 1;
	padding: 0.06in 0.5in 0.2in;
}

.cs--print .cs-story {
	margin-top: 0.14in;
}

.cs--print .cs-story__row {
	grid-template-columns: 1.1in 1fr;
	gap: 0.12in;
	padding: 0.08in 0;
}

.cs--print .cs-story dt {
	font-size: 9.5px;
}

.cs--print .cs-story dd {
	font-size: 12px;
	line-height: 1.45;
}

.cs--print .cs-plans {
	margin-top: 0.1in;
	font-size: 11.5px;
}

.cs-quote--print {
	margin-top: 0.16in;
	padding: 0.14in 0.18in;
	background: var(--cs-light-2);
	border-left: 3px solid var(--cs-accent);
}

.cs-quote--print p {
	font-size: 12px;
	line-height: 1.45;
	color: var(--cs-dark);
}

.cs-quote--print footer {
	margin-top: 6px;
	font-size: 9.5px;
	color: var(--cs-accent-text); /* On a light panel: the text-safe accent. */
}

.cs-sheet__facts {
	margin-top: 0.18in;
}

.cs--print .cs-facts {
	padding: 0.12in 0.16in;
}

.cs--print .cs-facts__row {
	padding: 0.06in 0;
}

.cs--print .cs-facts dt {
	font-size: 8.5px;
}

.cs--print .cs-facts dd {
	font-size: 10.5px;
}

.cs-sheet__phases {
	padding: 0 0.5in 0.2in;
}

.cs-phases__line {
	margin: 0 0 0.08in;
	font-family: var(--cs-font-display);
	font-weight: var(--cs-display-wt);
	text-transform: var(--cs-display-case);
	font-size: 22px;
	line-height: 1;
	color: var(--cs-dark);
}

.cs-phases--compact {
	grid-template-columns: repeat(4, 1fr);
	gap: 0.1in;
}

.cs-phases--compact .cs-phase {
	gap: 3px;
	padding: 0.07in 0.09in 0.08in;
	border-top-width: 3px;
}

.cs-phases--compact .cs-phase__label {
	font-size: 15px;
}

.cs-phases--compact .cs-phase__label .cs-badge {
	padding: 1px 5px;
	font-size: 7px;
}

.cs-phases--compact .cs-phase__note {
	font-size: 10px;
}

.cs-phases--compact .cs-phase__facts div {
	padding: 1px 0;
	font-size: 9px;
}

.cs-phases--compact .cs-phase__facts dt {
	font-size: 7.5px;
}

.cs-phases--compact .mvp-figure img {
	height: 0.5in;
}

.cs-phases--compact .mvp-placeholder {
	aspect-ratio: auto;
	height: auto;
	min-height: 0.3in;
	padding: 3px;
}

.cs-phases--compact .mvp-placeholder p {
	margin: 0;
}

.cs-sheet__gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.12in;
	padding: 0 0.5in 0.22in;
}

.cs-sheet__gallery .mvp-figure img {
	display: block;
	width: 100%;
	height: 1.4in;
	object-fit: cover;
}

.cs-sheet__gallery .mvp-tag {
	right: 4px;
	bottom: 4px;
	padding: 2px 6px;
	font-size: 8px;
}

.cs-sheet__foot {
	display: flex;
	justify-content: space-between;
	gap: 0.2in;
	padding: 0.09in 0.5in; /* D51: room for the address line. */
	background: var(--cs-dark);
	color: var(--cs-body-on-dark);
	font-size: 9.5px;
}

.cs-sheet__foot strong {
	color: var(--cs-light);
}

/* Markers in print stay readable (they're placeholders; a sheet with markers isn't ready to send). */
.cs--print .mvp-marker {
	font-size: 8.5px !important;
}

@media print {
	.cs-print-body {
		background: none;
	}
}

/* One-pager, projects built in phases: the timeline takes one column per phase, the free columns hold gallery photos. */
.cs-sheet__phases-row {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.1in;
	align-items: stretch;
}

.cs-sheet__phases-row > .cs-phases--compact {
	grid-column: span var(--cs-phase-cols, 4);
	grid-template-columns: repeat(var(--cs-phase-cols, 4), 1fr);
}

.cs-sheet__phase-photo .mvp-figure,
.cs-sheet__phase-photo .mvp-figure img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 1.4in;
	object-fit: cover;
}

.cs-sheet__phase-photo .mvp-tag {
	right: 4px;
	bottom: 4px;
	padding: 2px 6px;
	font-size: 8px;
}

/* One-pager: the description line stays small so the sheet keeps its footer on the page. */
.cs-sheet .cs-summary {
	margin: 2px 0 0;
	font-size: 10.5px;
}

.cs-sheet--summary .cs-sheet__gallery .mvp-figure img {
	height: 1.25in;
}

/* "Why it worked" (D35): the last story row; a quote line carries its credit. */
.cs-why__credit {
	display: block;
	margin-top: 4px;
	font-size: 0.82em;
	font-weight: 700;
	color: var(--cs-dark);
}

/* ---------- Plan spec sheets (templates/spec-sheet.php, 2026-10-09): the one-pager's sheet with a floor plan ---------- */

.spec-sheet__h {
	margin: 0 0 0.06in;
	font-family: var(--cs-font-body);
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--cs-accent-text);
}

.spec-sheet__body {
	padding-top: 0.18in;
}

.spec-sheet__plans {
	display: flex;
	gap: 0.14in;
	align-items: flex-start;
}

.spec-sheet__plans .mvp-figure {
	flex: 1;
	min-width: 0;
	margin: 0;
	background: #fff;
}

/* The drawing sets the height (wide plans stay short), up to the room the sheet has. */
.spec-sheet__plans .mvp-figure img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 4.1in;
	object-fit: contain;
	aspect-ratio: auto;
}

.spec-sheet__plans .mvp-tag {
	position: static;
	display: block;
	font-size: 8.5px;
}

.spec-sheet .cs-sheet__facts {
	margin-top: 0;
}

.spec-sheet__facts-h {
	margin-top: 0.14in;
}

.spec-sheet .cs-sheet__facts > .spec-sheet__h {
	margin-top: 0.14in;
}

.spec-sheet__uses {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.spec-sheet__uses li {
	padding: 3px 7px;
	background: var(--cs-light-2);
	font-size: 9.5px;
	font-weight: 700;
	color: var(--cs-dark);
}

.spec-sheet__stack {
	align-self: center;
}

.spec-sheet__projects {
	padding: 0 0.5in 0.18in;
}

.spec-sheet__projects ul {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 18px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 11px;
	color: var(--cs-dark);
}

.spec-sheet__plans--stack {
	flex-direction: column;
}

.spec-sheet__plans--stack .mvp-figure {
	width: 100%;
}

.spec-sheet__plans--stack .mvp-figure img {
	max-height: 1.45in; /* 1.72 until the Westley stacking row (D107) needed the room. */
}

/* ---------- Project portfolio (templates/portfolio.php, 2026-10-09): cover, one-pagers, back page ---------- */

.portfolio .cs-sheet {
	break-after: page;
}

.portfolio .cs-sheet:last-child {
	break-after: auto;
}

.portfolio__cover,
.portfolio__back {
	justify-content: center;
	background: var(--cs-dark);
	color: var(--cs-light);
}

.portfolio__cover-photo,
.portfolio__cover-photo .mvp-figure,
.portfolio__cover-photo img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
}

.portfolio__cover::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(34, 54, 42, 0.92) 0%, rgba(34, 54, 42, 0.55) 55%, rgba(34, 54, 42, 0.2) 100%);
}

.portfolio__cover-body {
	position: relative;
	z-index: 1;
	align-self: flex-start;
	margin-top: auto;
	margin-bottom: auto;
	padding: 0 0.7in;
	transform: translateY(-1.6in);
}

.portfolio__logo {
	display: block;
	width: 3.4in;
	height: auto;
	margin-bottom: 0.5in;
}

.portfolio__eyebrow {
	margin: 0 0 0.12in;
	font-family: var(--cs-font-body);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--cs-accent);
}

.portfolio__title {
	margin: 0;
	font-family: var(--cs-font-display);
	font-weight: var(--cs-display-wt);
	text-transform: var(--cs-display-case);
	font-size: 86px;
	line-height: 0.92;
	color: var(--cs-light);
}

.portfolio__cover-tag {
	position: absolute;
	z-index: 1;
	right: 0.3in;
	bottom: 0.3in;
	margin: 0;
	padding: 4px 10px;
	background: rgba(34, 54, 42, 0.85);
	font-size: 10px;
	color: var(--cs-light);
}

.portfolio__back-body {
	padding: 0 0.7in;
	text-align: center;
}

.portfolio__seal {
	display: block;
	width: 1.9in;
	height: auto;
	margin: 0 auto 0.5in;
}

.portfolio__cta {
	margin: 0 0 0.4in;
	font-family: var(--cs-font-display);
	font-weight: var(--cs-display-wt);
	text-transform: var(--cs-display-case);
	font-size: 64px;
	line-height: 0.95;
	color: var(--cs-accent);
}

.portfolio__contact {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 17px;
	line-height: 1.5;
	color: var(--cs-light);
}

.portfolio__contact li + li {
	margin-top: 0.14in;
}

/* The Dakota's two versions side by side on its spec sheet (Kelsey 2026-10-12, D74). */
.spec-sheet__versions {
	width: 100%;
	border-collapse: collapse;
	font-size: 9.5px;
	line-height: 1.25;
	color: var(--cs-dark);
}

.spec-sheet__versions th,
.spec-sheet__versions td {
	padding: 2px 4px 2px 0;
	border-bottom: 1px solid var(--cs-light-2);
	text-align: left;
	vertical-align: top;
}

.spec-sheet__versions thead th {
	font-size: 8px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.spec-sheet__versions tbody th {
	font-weight: 700;
}


/* ---------- Phase cards (Kelsey 2026-10-13, D100) ----------
   Every card: photo on top (same height on all), then the title, description and facts. Cards size to their content
   and line up at the top, so a short phase never stretches into empty space. */
.cs-phases {
	align-items: start;
}

.cs-phase .cs-phase__photo {
	margin: 0 0 4px;
}

.cs-phase .cs-phase__photo img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	height: auto;
	object-fit: cover;
}

/* Every sheet: logo and footer text at least 0.5 in from the page edge, so nothing prints into a printer's dead zone. */
.cs-sheet__top {
	padding: 0.5in 0.5in 0.2in;
}

.cs-sheet__foot {
	padding: 0.12in 0.5in 0.5in;
}

/* The one-pager print view can hold two sheets (Westgroup): one per page. */
.cs--print .cs-sheet {
	break-after: page;
}

.cs--print .cs-sheet:last-child {
	break-after: auto;
}

/* Photo captions on full-bleed photos sit 0.5 in in from the page edge too (D100). */
.cs-sheet__hero .mvp-tag {
	right: 0.5in;
	bottom: 0.12in;
}

.portfolio__cover .portfolio__cover-tag {
	right: 0.5in;
	bottom: 0.5in;
}

/* A second photo beside the hero (Westgroup's Phase 4, D101): wide hero, tall photo, same height, edge to edge. */
.cs-sheet__hero--pair {
	display: grid;
	grid-template-columns: 2.1fr 1fr;
	gap: 0.06in;
}

.cs-sheet__hero--pair .mvp-figure {
	position: relative;
	margin: 0;
}

.cs-sheet__hero--pair .mvp-figure:first-child .mvp-tag {
	right: 0.12in;
}

/* Sheet phase cards: text only, all the height of the tallest card, one step smaller type (D101). */
.cs-sheet__phases-row {
	align-items: stretch;
}

.cs-sheet .cs-phases--compact {
	align-items: stretch;
}

.cs-sheet .cs-sheet__hero--pair .mvp-figure img {
	height: 2.4in;
}

.cs-sheet:has(.cs-sheet__hero--pair) .cs-phases--compact .cs-phase__note {
	font-size: 9.5px;
	line-height: 1.35;
}

.cs-sheet:has(.cs-sheet__hero--pair) .cs-phases--compact .cs-phase__facts div {
	font-size: 8.5px;
}

/* A note under the floor plan (Sierra: "Hot tub shown for scale, not included.", D103). */
.spec-sheet__note {
	margin: 0.06in 0 0;
	font-family: var(--cs-font-body);
	font-size: 9px;
	color: var(--cs-dark);
}
