/* Shared layout for project and writing pages. Loaded after index.css. */

.fixed-width {
	height: auto;
}

/* Header: same black block and big Akzidenz title, laid out with flex so the
   hero sits beside the title instead of floating over it. */
.page-header.header {
	height: auto;
	min-height: 518px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 60px;
	padding-bottom: 80px;
}
.page-header .header-text {
	float: none;
	height: auto;
	font-size: 100px;
	line-height: 1;
}
.page-header .support {
	padding-top: 25px;
	max-width: 520px;
	line-height: 1.4;
}
.page-header .hero {
	flex: 0 1 560px;
	min-width: 0;
}
.page-header .hero img,
.page-header .hero video,
.page-header .hero iframe {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid #333;
}
.page-header .hero.square {
	flex-basis: 380px;
}
.page-header .hero.phone {
	flex: 0 0 auto;
	max-width: 300px;
}
.page-header .hero.phone img {
	width: auto;
	max-width: 100%;
	max-height: 560px;
	margin: 0 auto;
	border: 0;
}
.page-header .hero-mark {
	flex: 0 0 auto;
	font-size: 220px;
	line-height: 1;
	color: #fff;
	opacity: 0.9;
}

/* Facts row under the header */
.facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 30px;
	max-width: 1000px;
	padding: 50px 0 10px 0;
	border-bottom: 3px solid #000;
}
.facts dt {
	font-size: 13px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #666;
	margin-bottom: 8px;
}
.facts dd {
	margin: 0 0 20px 0;
	font-size: 18px;
	line-height: 1.4;
}

.content.section {
	min-height: 0;
	padding-top: 40px;
}
.content h1 {
	margin-top: 60px;
	letter-spacing: 0.02em;
}
.content h3 {
	margin-top: 30px;
}
.content .body-text {
	max-width: 750px;
	width: 100%;
	box-sizing: border-box;
	margin-bottom: 20px;
}
.content ul.body-text {
	padding-left: 22px;
}
.content ul.body-text li {
	margin-bottom: 8px;
}

/* Link buttons: black tiles that invert on hover, like the home page grid */
.links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 30px 0 10px 0;
}
.btn {
	display: inline-block;
	background: #000;
	color: #fff;
	border: 3px solid #000;
	padding: 14px 22px;
	font-size: 18px;
	text-decoration: none;
	transition: background 0.15s, color 0.15s;
}
.btn:hover,
.btn:focus-visible {
	background: #fff;
	color: #000;
}
.btn.ghost {
	background: #fff;
	color: #000;
}
.btn.ghost:hover,
.btn.ghost:focus-visible {
	background: #000;
	color: #fff;
}

/* Figures */
figure {
	margin: 30px 0;
	max-width: 900px;
}
figure img,
figure video {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid #ddd;
}
figcaption {
	font-family: "Helvetica Neue", sans-serif;
	font-size: 14px;
	color: #666;
	padding-top: 10px;
	line-height: 1.5;
}
.strip {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
}
.strip img {
	width: 100%;
	height: auto;
	display: block;
}
.pipeline {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 10px;
	max-width: 1000px;
	margin: 30px 0;
}
.pipeline > div {
	background: #000;
	color: #fff;
	padding: 25px;
	line-height: 1.5;
}
.pipeline b {
	display: block;
	font-size: 22px;
	margin-bottom: 8px;
}
.pipeline .step {
	display: block;
	font-size: 13px;
	letter-spacing: 0.12em;
	color: #8a3ab9;
	margin-bottom: 10px;
}

/* Live embeds */
.embed {
	max-width: 1000px;
	border: 3px solid #000;
	margin: 30px 0;
}
.embed iframe {
	display: block;
	width: 100%;
	height: 620px;
	border: 0;
}

/* Writing: list of posts */
.posts {
	list-style: none;
	padding: 0;
	margin: 30px 0;
	max-width: 900px;
}
.posts li {
	border-top: 1px solid #ddd;
	padding: 22px 0;
}
.posts li:last-child {
	border-bottom: 1px solid #ddd;
}
.posts .date {
	display: block;
	font-size: 13px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #666;
	margin-bottom: 6px;
}
.posts a.title,
.posts span.title {
	font-size: 24px;
	font-weight: 700;
	color: #000;
	text-decoration: none;
	line-height: 1.3;
}
.posts a.title:hover {
	text-decoration: underline;
}
.posts p {
	font-family: "Helvetica Neue", sans-serif;
	color: #333;
	line-height: 1.6;
	margin-top: 8px;
}

blockquote {
	border-left: 6px solid #000;
	margin: 30px 0;
	padding: 5px 0 5px 25px;
	font-size: 24px;
	line-height: 1.5;
	max-width: 750px;
}

/* "More" footer: a row of the home page's black tiles */
.more.section {
	min-height: 0;
	padding-top: 80px;
	padding-bottom: 100px;
}
.more .header-text {
	float: none;
	height: auto;
	font-size: 60px;
	margin-bottom: 30px;
}
.tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 10px;
	max-width: 1200px;
}
.tiles a {
	display: flex;
	align-items: flex-end;
	aspect-ratio: 1 / 1;
	background: #000;
	color: #fff;
	padding: 20px;
	font-size: 28px;
	line-height: 1.1;
	text-decoration: none;
	box-sizing: border-box;
	transition: background 0.15s, color 0.15s;
	border: 3px solid #000;
}
.tiles a:hover,
.tiles a:focus-visible {
	background: #fff;
	color: #000;
}
.tiles a[aria-current="page"] {
	background: #fff;
	color: #000;
}

@media (max-width: 1100px) {
	.page-header.header {
		flex-direction: column;
		align-items: flex-start;
	}
	.page-header .hero {
		flex-basis: auto;
		width: 100%;
		max-width: 640px;
	}
	.page-header .hero.phone {
		max-width: 300px;
		margin: 0 auto;
	}
	.page-header .hero-mark {
		font-size: 150px;
	}
}

@media (max-width: 768px) {
	.section {
		padding: 50px 20px 0 20px;
	}
	.home-icon {
		top: 20px;
		left: 20px;
	}
	.page-header.header {
		min-height: 0;
		padding-top: 80px;
		padding-bottom: 50px;
		gap: 40px;
	}
	.page-header .header-text {
		font-size: 56px;
	}
	.page-header .support {
		font-size: 18px;
	}
	.page-header .hero-mark {
		font-size: 110px;
	}
	.content .body-text {
		width: 100%;
	}
	.strip {
		grid-template-columns: repeat(2, 1fr);
	}
	.embed iframe {
		height: 520px;
	}
	.more .header-text {
		font-size: 40px;
	}
	.tiles {
		grid-template-columns: repeat(2, 1fr);
	}
	.tiles a {
		font-size: 20px;
		padding: 14px;
	}
	blockquote {
		font-size: 20px;
	}
}

/* Older case-study pages (Clutch, Spitfire, Ellomix, Pinterest) on phones */
@media (max-width: 768px) {
	.header.section:not(.page-header) {
		height: auto;
		min-height: 0;
		padding-top: 80px;
		padding-bottom: 40px;
		overflow: hidden;
	}
	.header.section:not(.page-header) .header-text {
		float: none;
		height: auto;
		font-size: 56px;
		line-height: 1.05;
	}
	.header.section:not(.page-header) .support {
		width: auto;
		padding-top: 20px;
		font-size: 18px;
	}
	.header.section:not(.page-header) > img,
	.header.section:not(.page-header) > video,
	.header.section:not(.page-header) .float-right:not(.phone-mockup) {
		float: none !important;
		display: block;
		width: 100% !important;
		max-width: 320px;
		height: auto;
		margin-top: 30px;
	}
	.section:not(.page-header) img,
	.section:not(.page-header) video,
	.section:not(.page-header) iframe {
		max-width: 100%;
		height: auto;
	}
	.section iframe.vimeo {
		aspect-ratio: 16 / 9;
		width: 100%;
	}
	.body-text,
	.text-width {
		width: auto !important;
		max-width: 100%;
	}
	.evol img {
		padding-left: 0;
	}
}

/* Videos, side-by-side images, post thumbnails */
figure video {
	background: #000;
}
.video-embed {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #000;
}
.video-embed iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
.pair {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}
.trio {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	max-width: 900px;
}
.posts li.has-thumb {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 25px;
	align-items: start;
}
.posts .thumb {
	width: 200px;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	display: block;
	border: 1px solid #ddd;
}
.content code {
	background: #f2f2f2;
	padding: 2px 6px;
}
@media (max-width: 768px) {
	.pair {
		grid-template-columns: 1fr;
	}
	.trio {
		grid-template-columns: 1fr;
	}
	.posts li.has-thumb {
		grid-template-columns: 1fr;
		gap: 12px;
	}
	.posts .thumb {
		width: 100%;
	}
}
.posts li {
	overflow-wrap: anywhere;
}

/* CSS-only laptop frame for desktop screenshots; mobile-device heroes stay unchanged. */
.header .hero.laptop {
	flex: 0 1 600px;
	min-width: 0;
	box-sizing: border-box;
	padding: 0 20px 22px;
}
.header .hero.laptop .laptop-display {
	position: relative;
	min-width: 0;
	border: 10px solid #191b21;
	border-top-width: 16px;
	border-bottom-width: 9px;
	border-radius: 15px 15px 4px 4px;
	background: #191b21;
	box-shadow: 0 0 0 1px #555961, 0 16px 40px rgba(0, 0, 0, 0.32);
}
.header .hero.laptop .laptop-display::before {
	content: "";
	position: absolute;
	top: -11px;
	left: 50%;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	transform: translateX(-50%);
	background: #55616d;
}
.header .hero.laptop .laptop-display img,
.header .hero.laptop .laptop-display video {
	display: block;
	width: 100%;
	height: auto;
	box-sizing: border-box;
	border: 0;
}
.header .hero.laptop .laptop-base {
	position: relative;
	width: calc(100% + 40px);
	height: 19px;
	margin-left: -20px;
	border-radius: 2px 2px 13px 13px;
	background: linear-gradient(to bottom, #d1d4da 0%, #a1a6ae 60%, #626975 100%);
	box-shadow: 0 9px 16px rgba(0, 0, 0, 0.3);
}
.header .hero.laptop .laptop-base::before {
	content: "";
	position: absolute;
	top: 0;
	left: 40%;
	width: 20%;
	height: 6px;
	border-radius: 0 0 7px 7px;
	background: #777e87;
}
@media (max-width: 1100px) {
	/* The project header switches to a column at this breakpoint. */
	.header .hero.laptop {
		flex: 0 0 auto;
		width: 100%;
		max-width: 640px;
	}
}
@media (max-width: 768px) {
	.header .hero.laptop {
		flex-basis: auto;
		width: 100%;
		max-width: 640px;
		padding: 0 10px 16px;
	}
	.header .hero.laptop .laptop-base {
		width: calc(100% + 18px);
		margin-left: -9px;
		height: 13px;
	}
}
