@charset "utf-8";
/* Project detail pages — loaded after split-style.css
   One visual system: blueprint sheets (thin rules, grid paper, line drawings)
   marked up like a pitch (corner arcs, halfway lines, match minutes). */

/* ── Page Scroll (split-style locks the body for the home page) ── */
body.project-page {
	--line: rgba(26, 26, 26, 0.18);
	--line-strong: rgba(26, 26, 26, 0.35);
	--line-faint: rgba(26, 26, 26, 0.05);
	--drawing: rgba(26, 26, 26, 0.55);
	--sheet-gap: 5.5rem;

	overflow-y: auto;
	overflow-x: hidden;
	height: auto;
	min-height: 100vh;
	/* Faint grid paper behind the whole page */
	background-image:
		linear-gradient(var(--line-faint) 1px, transparent 1px),
		linear-gradient(90deg, var(--line-faint) 1px, transparent 1px);
	background-size: 40px 40px;
	background-position: center top;
}

.project-page .site-header {
	background: var(--paper);
	border-bottom: 1px solid var(--line);
}

.project-page .site-title img {
	display: block;
}

.project-page .site-footer {
	position: relative;
	background: var(--paper);
	border-top: 1px solid var(--line);
}

.project-main {
	max-width: 1200px;
	margin: 0 auto;
	padding: 6.5rem 3rem 5rem;
	animation: fadeSlideUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) backwards;
}

/* ── Shared Type ── */
.bp-mono,
.back-link,
.screenshot-placeholder span {
	font-family: 'DM Mono', monospace;
	font-weight: 400;
	font-size: 0.62rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-light);
}

.bp-title {
	font-family: 'Instrument Sans', sans-serif;
	font-weight: 600;
	font-size: clamp(1.9rem, 4.2vw, 3.4rem);
	line-height: 0.98;
	letter-spacing: -0.03em;
	text-transform: uppercase;
	max-width: 800px;
}

.bp-label {
	display: block;
	margin-bottom: 1.25rem;
}

.back-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	text-decoration: none;
	transition: color 0.3s ease;
}

.back-link:hover {
	color: var(--ink);
}

.back-link svg,
.btn-live svg,
.next-title svg {
	width: 14px;
	height: 14px;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.5;
	flex-shrink: 0;
}

/* ── Line Drawings (shared by every illustration) ── */
.drawing {
	display: block;
	overflow: visible;
	fill: none;
	stroke: var(--drawing);
	stroke-width: 1;
	stroke-linejoin: round;
	stroke-linecap: round;
}

.drawing .dash {
	stroke-dasharray: 3 3;
	opacity: 0.75;
}

.drawing .spot {
	fill: var(--drawing);
	stroke: none;
}

.drawing .mark {
	fill: var(--accent);
	stroke: none;
}

/* Hides lines behind an overlapping shape */
.drawing .fill-paper {
	fill: var(--paper);
}

.drawing .mark-line {
	stroke: var(--accent);
}

/* Solid strokes draw themselves in when their container scrolls into view */
.js .reveal .draw,
.js .reveal.draw {
	stroke-dasharray: 1;
	stroke-dashoffset: 1;
	transition: stroke-dashoffset 1.6s cubic-bezier(0.65, 0, 0.35, 1) 0.25s;
}

.js .reveal.in-view .draw,
.js .reveal.in-view.draw {
	stroke-dashoffset: 0;
}

/* ── Hero ── */
.project-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	align-items: center;
	gap: 2rem 4rem;
	padding: 3rem 0 var(--sheet-gap);
}

.project-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1.5rem;
	margin-bottom: 1.5rem;
}

.project-meta .project-num {
	color: var(--accent);
}

.project-heading {
	font-family: 'Playfair Display', serif;
	font-weight: 900;
	font-size: clamp(2.6rem, 7vw, 5.5rem);
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.01em;
	margin-bottom: 1.5rem;
	overflow-wrap: anywhere;
}

.project-summary {
	font-size: clamp(1rem, 1.6vw, 1.2rem);
	line-height: 1.6;
	color: var(--ink-light);
	max-width: 560px;
	margin-bottom: 2rem;
}

.btn-live {
	display: inline-flex;
	align-items: center;
	gap: 0.7rem;
	padding: 0.85rem 2rem;
	background: var(--ink);
	color: var(--paper);
	font-weight: 600;
	font-size: 0.72rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background 0.35s ease;
}

.btn-live:hover {
	background: var(--accent);
}

.hero-pitch {
	position: relative;
}

.hero-pitch .drawing {
	width: 100%;
}

.hero-pitch figcaption {
	display: flex;
	justify-content: space-between;
	margin-top: 0.9rem;
}

/* ── Sheet: the frame every section sits in ── */
.sheet {
	position: relative;
	display: block;
	background: var(--paper);
	border: 1px solid var(--line);
	color: inherit;
	text-decoration: none;
}

/* Corner arcs, like the corner of a pitch */
.sheet::after {
	content: '';
	position: absolute;
	inset: -1px;
	pointer-events: none;
	z-index: 3;
	background:
		radial-gradient(circle at 0 0, transparent 13px, var(--line-strong) 13px 14px, transparent 14.5px) top left / 16px 16px no-repeat,
		radial-gradient(circle at 100% 0, transparent 13px, var(--line-strong) 13px 14px, transparent 14.5px) top right / 16px 16px no-repeat,
		radial-gradient(circle at 0 100%, transparent 13px, var(--line-strong) 13px 14px, transparent 14.5px) bottom left / 16px 16px no-repeat,
		radial-gradient(circle at 100% 100%, transparent 13px, var(--line-strong) 13px 14px, transparent 14.5px) bottom right / 16px 16px no-repeat;
}

/* Halfway line with a centre circle between stacked sheets */
.sheet + .sheet {
	margin-top: var(--sheet-gap);
}

.sheet + .sheet::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	top: calc(var(--sheet-gap) / -2 - 16px);
	height: 32px;
	pointer-events: none;
	background:
		radial-gradient(circle, var(--line-strong) 0 2px, transparent 2.5px) center / 32px 32px no-repeat,
		radial-gradient(circle, transparent 0 14px, var(--line-strong) 14px 15px, transparent 15.5px) center / 32px 32px no-repeat,
		repeating-linear-gradient(90deg, var(--line) 0 4px, transparent 4px 8px) center / 100% 1px no-repeat;
}

.sheet-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.5rem;
	border-bottom: 1px solid var(--line);
}

.sheet-bar .bp-mono:first-child {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	color: var(--ink);
}

/* Red marker on every sheet label */
.sheet-bar .bp-mono:first-child::before {
	content: '';
	width: 6px;
	height: 6px;
	background: var(--accent);
	flex-shrink: 0;
}

.sheet-minute {
	opacity: 0.7;
}

.sheet-head {
	display: grid;
	grid-template-columns: 1fr minmax(220px, 340px);
	align-items: end;
	gap: 1.5rem 3rem;
	padding: 2.25rem 1.75rem 2.75rem;
	border-bottom: 1px solid var(--line);
}

.sheet-intro {
	font-size: 0.85rem;
	line-height: 1.55;
	color: var(--ink-light);
}

/* ── Cover ── */
.project-cover {
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.project-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	filter: grayscale(15%) contrast(1.03);
}

/* ── Overview: two cells split by a rule ── */
.overview-grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	gap: 1px;
}

/* Cells draw their own rules (outline fills the 1px gap) so the lines
   fade in with each cell instead of showing as a grey block first */
.overview-cell,
.bp-cell {
	outline: 1px solid var(--line);
}

.overview-cell {
	display: flex;
	flex-direction: column;
	padding: 2.25rem 1.75rem;
}

.block-lead {
	font-family: 'Instrument Sans', sans-serif;
	font-weight: 500;
	font-size: clamp(1.35rem, 2.6vw, 2.1rem);
	line-height: 1.35;
	letter-spacing: -0.01em;
	color: var(--ink);
	max-width: 760px;
}

.block-text {
	font-size: clamp(0.95rem, 1.3vw, 1.05rem);
	line-height: 1.7;
	color: var(--ink-light);
}

.overview-drawing {
	width: 100%;
	max-width: 260px;
	margin-top: auto;
	padding-top: 2.5rem;
	align-self: center;
}

/* ── Project Summary: four drawn cells ── */
.bp-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1px;
}

.bp-cell {
	display: flex;
	flex-direction: column;
}

.bp-cell-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.25rem;
	border-bottom: 1px dashed var(--line);
}

.bp-cell-bar .bp-mono:first-child {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	color: var(--ink);
}

/* Small red marker that slides in on the hovered cell */
.bp-cell-bar .bp-mono:first-child::before {
	content: '';
	width: 6px;
	height: 6px;
	background: var(--accent);
	margin-left: -12px;
	opacity: 0;
	transition: opacity 0.3s ease, margin 0.3s ease;
}

.bp-index {
	opacity: 0.6;
}

/* Drawing area: grid paper and corner crosses fade in on hover */
.bp-figure {
	position: relative;
	aspect-ratio: 4 / 3;
	display: flex;
	align-items: center;
	justify-content: center;
	border-bottom: 1px solid var(--line);
}

.bp-figure::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(26, 26, 26, 0.07) 1px, transparent 1px),
		linear-gradient(90deg, rgba(26, 26, 26, 0.07) 1px, transparent 1px);
	background-size: 20px 20px;
	background-position: center;
	opacity: 0;
	transition: opacity 0.4s ease;
}

.bp-cross {
	position: absolute;
	width: 9px;
	height: 9px;
	opacity: 0;
	transition: opacity 0.4s ease;
	background:
		linear-gradient(var(--ink-light), var(--ink-light)) center / 1px 100% no-repeat,
		linear-gradient(var(--ink-light), var(--ink-light)) center / 100% 1px no-repeat;
}

.bp-cross:nth-of-type(1) { top: 12px; left: 12px; }
.bp-cross:nth-of-type(2) { top: 12px; right: 12px; }
.bp-cross:nth-of-type(3) { bottom: 12px; left: 12px; }
.bp-cross:nth-of-type(4) { bottom: 12px; right: 12px; }

.bp-figure .drawing {
	position: relative;
	width: 66%;
	max-width: 200px;
	transition: stroke 0.4s ease, transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.bp-cell:hover .bp-figure::before,
.bp-cell:hover .bp-cross {
	opacity: 1;
}

.bp-cell:hover .drawing {
	--drawing: var(--ink);
	transform: translateY(-4px);
}

.bp-cell:hover .bp-cell-bar .bp-mono:first-child::before {
	opacity: 1;
	margin-left: 0;
}

.bp-body {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 2rem;
	flex: 1;
	padding: 1.5rem 1.25rem;
}

.bp-value {
	font-family: 'Instrument Sans', sans-serif;
	font-weight: 600;
	font-size: clamp(1.2rem, 1.9vw, 1.6rem);
	line-height: 1;
	letter-spacing: -0.02em;
	text-transform: uppercase;
}

.bp-body p {
	font-size: 0.8rem;
	line-height: 1.55;
	color: var(--ink-light);
}

/* Touchline ruler along the bottom edge */
.bp-ruler {
	position: relative;
	height: 22px;
	border-top: 1px solid var(--line);
	background:
		repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 6px) left 28px top 0 / calc(100% - 56px) 7px no-repeat,
		repeating-linear-gradient(90deg, rgba(26, 26, 26, 0.3) 0 1px, transparent 1px 60px) left 28px top 0 / calc(100% - 56px) 11px no-repeat;
}

.bp-ruler::before,
.bp-ruler::after {
	content: '+';
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	font-family: 'DM Mono', monospace;
	font-size: 0.8rem;
	line-height: 1;
	color: var(--ink-light);
}

.bp-ruler::before { left: 9px; }
.bp-ruler::after { right: 9px; }

/* ── Key Features: rows that fill dark on hover, like the home page list ── */
.feature-rows {
	list-style: none;
}

.feature-row {
	position: relative;
	display: grid;
	grid-template-columns: 4.5rem minmax(0, 1fr) minmax(0, 1.3fr) 44px;
	align-items: center;
	gap: 1rem 2.5rem;
	padding: 2rem 1.75rem;
	overflow: hidden;
}

.feature-row + .feature-row {
	border-top: 1px dashed var(--line);
}

.feature-row::before {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--ink);
	transform: scaleY(0);
	transform-origin: bottom;
	transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1);
	z-index: 0;
}

.feature-row > * {
	position: relative;
	z-index: 1;
	transition: color 0.3s ease, opacity 0.3s ease, transform 0.45s cubic-bezier(0.23, 1, 0.32, 1);
}

.feature-index {
	color: var(--accent);
}

.feature-row h3 {
	font-family: 'Instrument Sans', sans-serif;
	font-weight: 600;
	font-size: clamp(1.15rem, 2vw, 1.6rem);
	line-height: 1.05;
	letter-spacing: -0.02em;
	text-transform: uppercase;
}

.feature-row p {
	font-size: 0.9rem;
	line-height: 1.65;
	color: var(--ink-light);
}

/* Dashed "pass" arrow that appears on hover */
.feature-pass {
	width: 44px;
	--drawing: var(--paper);
	opacity: 0;
	transform: translateX(-10px);
}

.feature-row:hover::before {
	transform: scaleY(1);
}

.feature-row:hover h3 {
	color: var(--paper);
}

.feature-row:hover p {
	color: rgba(242, 240, 237, 0.7);
}

.feature-row:hover .feature-pass {
	opacity: 1;
	transform: none;
}

/* ── Screenshots ── */
.screenshot-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 2.5rem 2rem;
	padding: 2rem 1.75rem 2.25rem;
}

/* Rhythm: wide, two side by side, wide, ... */
.screenshot-grid figure:nth-child(3n + 1) {
	grid-column: 1 / -1;
}

.screenshot-grid figure {
	margin: 0;
}

.screenshot-frame {
	overflow: hidden;
	border: 1px solid var(--line);
}

.screenshot-grid img,
.screenshot-placeholder {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	display: block;
	transition: transform 0.9s cubic-bezier(0.23, 1, 0.32, 1);
}

.screenshot-grid figure:nth-child(3n + 1) img,
.screenshot-grid figure:nth-child(3n + 1) .screenshot-placeholder {
	aspect-ratio: 21 / 10;
}

.screenshot-grid figure:hover img,
.screenshot-grid figure:hover .screenshot-placeholder {
	transform: scale(1.04);
}

.screenshot-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: rgba(26, 26, 26, 0.03);
	background-image:
		linear-gradient(rgba(26, 26, 26, 0.06) 1px, transparent 1px),
		linear-gradient(90deg, rgba(26, 26, 26, 0.06) 1px, transparent 1px);
	background-size: 20px 20px;
	background-position: center;
}

.screenshot-grid figcaption {
	display: flex;
	gap: 0.75rem;
	margin-top: 0.9rem;
}

.screenshot-grid figcaption .bp-mono:first-child {
	color: var(--ink);
}

/* ── Next Project ── */
.next-body {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 220px;
	padding: 2.5rem 1.75rem;
	overflow: hidden;
}

/* Centre circle and halfway line behind the title */
.next-pitch {
	position: absolute;
	top: 50%;
	right: 8%;
	width: min(42%, 300px);
	transform: translateY(-50%);
	transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.next-title {
	position: relative;
	font-family: 'Playfair Display', serif;
	font-weight: 900;
	font-size: clamp(2rem, 5vw, 4rem);
	text-transform: uppercase;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	gap: 1rem;
	transition: color 0.3s ease;
}

.next-title svg {
	width: clamp(22px, 3vw, 40px);
	height: clamp(22px, 3vw, 40px);
	transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.sheet.next-project:hover .next-title {
	color: var(--accent);
}

.sheet.next-project:hover .next-title svg {
	transform: translateX(8px);
}

.sheet.next-project:hover .next-pitch {
	--drawing: var(--ink);
	transform: translateY(-50%) rotate(8deg);
}

/* ── Scroll Reveal (only when project.js is running) ── */
.js .reveal {
	opacity: 0;
	transform: translateY(48px) scale(0.97);
	transition: opacity 0.9s cubic-bezier(0.23, 1, 0.32, 1),
		transform 0.9s cubic-bezier(0.23, 1, 0.32, 1);
	transition-delay: var(--reveal-delay, 0s);
}

.js .reveal.in-view {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.js .reveal,
	.js .reveal.in-view {
		opacity: 1;
		transform: none;
		transition: none;
	}

	.js .reveal .draw,
	.js .reveal.draw {
		stroke-dashoffset: 0;
		transition: none;
	}

	.screenshot-grid figure:hover img,
	.screenshot-grid figure:hover .screenshot-placeholder {
		transform: none;
	}
}

/* ── Mobile Responsive ── */
@media (max-width: 900px) {
	body.project-page {
		--sheet-gap: 4rem;
	}

	.project-main {
		padding: 5rem 1.5rem 3.5rem;
	}

	.project-hero {
		grid-template-columns: 1fr;
		padding-top: 2rem;
	}

	.sheet-bar {
		padding: 0.9rem 1.25rem;
	}

	.sheet-head {
		grid-template-columns: 1fr;
		padding: 1.75rem 1.25rem 2rem;
	}

	.overview-grid {
		grid-template-columns: 1fr;
	}

	.overview-cell {
		padding: 1.75rem 1.25rem;
	}

	.bp-grid {
		grid-template-columns: 1fr 1fr;
	}

	/* No hover on touch screens: show the grid paper by default */
	.bp-figure::before {
		opacity: 1;
	}

	.feature-row {
		grid-template-columns: 3rem 1fr;
		gap: 0.6rem 1rem;
		padding: 1.75rem 1.25rem;
	}

	.feature-row p {
		grid-column: 2;
	}

	.feature-pass {
		display: none;
	}

	.screenshot-grid {
		grid-template-columns: 1fr;
		gap: 2rem;
		padding: 1.25rem;
	}

	.screenshot-grid figure:nth-child(3n + 1) img,
	.screenshot-grid figure:nth-child(3n + 1) .screenshot-placeholder {
		aspect-ratio: 16 / 10;
	}

	.next-body {
		min-height: 160px;
		padding: 2rem 1.25rem;
	}

	.next-pitch {
		right: -6%;
		width: 55%;
		opacity: 0.6;
	}
}

@media (max-width: 560px) {
	.project-page .site-header-nav a {
		padding: 0.3rem 0.4rem;
	}

	.bp-grid {
		grid-template-columns: 1fr;
	}

	.bp-figure {
		aspect-ratio: 16 / 9;
	}
}
