/* Napa AI — portfolio page (/portfolio) */

/* Stats band at the top of the portfolio content (static: no hover states) */
.portfolio-stats {
	display: grid;
	grid-template-columns: 1fr;
	background: #fff;
	border: 1px solid rgba(12, 12, 14, 0.1);
	border-top: 4px solid var(--accent);
}

/* Mobile: value on the left, label beside it */
.portfolio-stat {
	display: flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	align-items: center;
	gap: 1.25rem;
	padding: 1.25rem 1.25rem;
	border-top: 1px solid rgba(12, 12, 14, 0.08);
}

.portfolio-stat:first-child {
	border-top: none;
}

.portfolio-stat-value {
	flex: 0 0 6.25rem;
	margin: 0;
	font-family: 'Kumbh Sans', system-ui, sans-serif;
	font-size: 2.25rem;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.02em;
	color: var(--accent);
}

.portfolio-stat-label {
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.4;
	color: var(--ink);
}

/* Tablet and up: three columns, value above label */
@media (min-width: 768px) {
	.portfolio-stats {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.portfolio-stat {
		flex-direction: column-reverse;
		justify-content: flex-end;
		align-items: flex-start;
		gap: 0.75rem;
		padding: 2rem 2.25rem;
		border-top: none;
		border-left: 1px solid rgba(12, 12, 14, 0.08);
	}

	.portfolio-stat:first-child {
		border-left: none;
	}

	.portfolio-stat-value {
		flex: none;
		font-size: 3rem;
	}

	.portfolio-stat-label {
		font-size: 1.0625rem;
	}
}

@media (min-width: 1024px) {
	.portfolio-stat-value {
		font-size: 3.75rem;
	}
}

/* Portfolio grid + cards */
.portfolio-grid {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: 1fr;
	list-style: none;
	margin-left: 0;
	margin-right: 0;
	margin-bottom: 0;
	padding: 0;
}

@media (min-width: 768px) {
	.portfolio-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.portfolio-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1.75rem;
	}

	/* Client sites: featured item full width, then two columns */
	.portfolio-grid.cols-2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.portfolio-grid-concepts {
	margin-top: 1.5rem;
}

@media (min-width: 1024px) {
	.portfolio-grid-concepts {
		margin-top: 1.75rem;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.portfolio-grid > li {
	display: flex;
}

.portfolio-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	background: #fff;
	border: 1px solid rgba(12, 12, 14, 0.1);
}

.portfolio-shot {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--mist);
	border-bottom: 1px solid rgba(12, 12, 14, 0.1);
}

.portfolio-shot img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
}

/* Card with no screenshot yet: solid brand panel at the same 16:10 size */
.portfolio-shot.is-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	background: linear-gradient(145deg, #3b0764 0%, #4c1d95 48%, #2e1065 100%);
	color: #fff;
}

.portfolio-placeholder-initials {
	font-family: 'Kumbh Sans', system-ui, sans-serif;
	font-size: 3.5rem;
	font-weight: 800;
	line-height: 1;
	letter-spacing: 0.02em;
}

.portfolio-placeholder-note {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.85);
}

.portfolio-card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 1.5rem;
}

.portfolio-domain {
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--stone);
}

.portfolio-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
}

.portfolio-card-cta {
	margin-top: auto;
	padding-top: 1.5rem;
}

/* Client testimonials — calm cards, two-up on larger screens */
.testimonial-grid {
	display: grid;
	gap: 1.25rem;
	margin-top: 2.5rem;
}

@media (min-width: 768px) {
	.testimonial-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.5rem;
	}
}

.testimonial {
	display: flex;
	flex-direction: column;
	height: 100%;
	margin: 0;
	padding: 1.75rem 1.5rem;
	background: rgba(255, 255, 255, 0.6);
	border: 1px solid rgba(12, 12, 14, 0.08);
	border-left: 3px solid var(--accent-soft);
}

@media (min-width: 768px) {
	.testimonial {
		padding: 2rem 2.5rem;
	}
}

.testimonial-quote {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 400;
	line-height: 1.7;
	color: #4b5260;
}

@media (min-width: 768px) {
	.testimonial-quote {
		font-size: 1.25rem;
	}
}

.testimonial-cite {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	margin-top: auto;
	padding-top: 1.25rem;
	font-size: 0.9375rem;
}

.testimonial-name {
	font-weight: 600;
	color: #2f3440;
}

.testimonial-role {
	color: #555b67;
}

/* Section intros sit on the paper background, where --stone falls just short of 4.5:1 */
.portfolio-intro {
	color: #555b67;
}

/* The most-starred project gets a full-width card so the other six fill even rows */
@media (min-width: 768px) {
	.portfolio-grid > li.is-featured {
		grid-column: 1 / -1;
	}

	.portfolio-grid > li.is-featured .portfolio-card {
		display: grid;
		grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	}

	.portfolio-grid > li.is-featured .portfolio-shot {
		border-bottom: none;
		border-right: 1px solid rgba(12, 12, 14, 0.1);
	}

	.portfolio-grid > li.is-featured .portfolio-card-body {
		justify-content: center;
		padding: 2rem 2.25rem;
	}

	.portfolio-grid > li.is-featured .portfolio-card-cta {
		margin-top: 0;
	}
}

@media (min-width: 1024px) {
	.portfolio-grid > li.is-featured .portfolio-card-body {
		padding: 2.5rem 3rem;
	}

	.portfolio-grid > li.is-featured h3 {
		font-size: 1.875rem;
	}

	.portfolio-grid > li.is-featured .portfolio-card-body > p:not(.portfolio-domain) {
		font-size: 1.125rem;
	}
}

/* Desktop-only screenshot lightbox */
body.portfolio-lightbox-open,
html.portfolio-lightbox-open {
	overflow: hidden;
}

.portfolio-lightbox[hidden] {
	display: none !important;
}

.portfolio-lightbox {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	background: rgba(12, 12, 14, 0.88);
}

.portfolio-lightbox-dialog {
	display: flex;
	flex-direction: column;
	max-width: min(960px, 100%);
	max-height: 100%;
	border-radius: 0;
}

.portfolio-lightbox-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.75rem;
}

.portfolio-lightbox-title {
	margin: 0;
	font-family: 'Kumbh Sans', system-ui, sans-serif;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
	color: #fff;
}

.portfolio-lightbox-close {
	flex-shrink: 0;
	margin: 0;
	padding: 0.4rem 0.9rem;
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 0;
	background: transparent;
	color: #fff;
	font-family: 'Kumbh Sans', system-ui, sans-serif;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}

.portfolio-lightbox-close:hover {
	background: #fff;
	border-color: #fff;
	color: var(--ink);
}

.portfolio-lightbox-close:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.portfolio-lightbox-image {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: calc(100vh - 7rem);
	border-radius: 0;
	background: #fff;
}

@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
	.portfolio-shot.is-zoomable {
		cursor: zoom-in;
	}

	.portfolio-shot.is-zoomable img:focus-visible {
		outline: 2px solid var(--accent-soft);
		outline-offset: 3px;
	}
}
