/* ==========================================================================
   AZ Portfolio — case study page + projects archive
   ========================================================================== */

.az-case,
.az-archive {
	background: var(--az-bg);
	color: var(--az-text);
}

/* ---------- Hero ---------- */
.az-case__hero {
	padding-block: 40px 56px;
}

.az-case__hero-inner {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.az-breadcrumbs {
	color: var(--az-subtle);
	display: flex;
	flex-wrap: wrap;
	font-family: var(--az-font-mono);
	font-size: 0.8125rem;
	gap: 8px;
}

.az-breadcrumbs a {
	color: var(--az-muted);
	text-decoration: none;
}

.az-breadcrumbs a:hover { color: var(--az-accent-light); }
.az-breadcrumbs [aria-current] { color: var(--az-accent-light); }

.az-case__title {
	margin: 0;
	max-width: 900px;
}

.az-case__lead {
	margin: 0;
	max-width: 720px;
}

.az-case__meta {
	border-block: 1px solid rgba(79, 165, 138, 0.2);
	display: grid;
	gap: 20px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin: 0;
	padding-block: 24px;
}

@media (min-width: 1024px) {
	.az-case__meta { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.az-case__meta dt {
	color: var(--az-subtle);
	font-size: 0.8125rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.az-case__meta dd {
	font-weight: 600;
	margin: 0;
	overflow-wrap: anywhere;
}

.az-case__meta dd a {
	align-items: center;
	display: inline-flex;
	gap: 6px;
	overflow-wrap: normal;
	text-decoration: none;
}

.az-case__meta-site { grid-column: 1 / -1; }

@media (min-width: 1024px) {
	.az-case__meta-site { grid-column: auto; }
}

/* Browser-frame screenshot */
.az-browser {
	background: var(--az-surface);
	border: 2px solid var(--az-accent);
	border-radius: 24px;
	margin: 0;
	padding: 12px;
}

@media (min-width: 768px) {
	.az-browser { padding: 16px; }
}

.az-browser__bar {
	display: flex;
	gap: 7px;
	padding: 0 4px 12px;
}

.az-browser__bar span {
	background: #2a3b4a;
	border-radius: 50%;
	height: 10px;
	width: 10px;
}

.az-browser__bar span:last-child { background: var(--az-accent); }

.az-browser__img {
	border-radius: var(--az-radius-sm);
	display: block;
	height: auto;
	width: 100%;
}

/* ---------- Sections ---------- */
.az-case__section { padding-block: 56px; }

@media (min-width: 768px) {
	.az-case__section { padding-block: 72px; }
}

.az-case__split {
	display: grid;
	gap: 20px;
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1024px) {
	.az-case__split {
		gap: 56px;
		grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	}
}

.az-case__split header {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.az-case__split h2 {
	font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.25rem);
	line-height: 1.2;
	margin: 0;
}

.az-case__stack {
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.az-case__text {
	color: var(--az-text-soft);
	font-size: 1.0625rem;
}

.az-case__text > :first-child { margin-top: 0; }
.az-case__text > :last-child { margin-bottom: 0; }

.az-case__callout {
	background: var(--az-surface);
	border: 2px solid var(--az-accent);
	border-radius: var(--az-radius);
	color: var(--az-text-soft);
	font-size: 1.0625rem;
	padding: 28px;
}

.az-case__callout > :first-child { margin-top: 0; }
.az-case__callout > :last-child { margin-bottom: 0; }

/* Steps */
.az-case__steps {
	display: grid;
	gap: 12px;
	grid-template-columns: minmax(0, 1fr);
	list-style: none;
	margin: 0;
	padding: 0;
}

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

@media (min-width: 1024px) {
	.az-case__steps { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
}

.az-case__steps li {
	background: var(--az-surface);
	border: 1px solid var(--az-border);
	border-radius: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 20px;
}

.az-case__steps li:last-child { border: 2px solid var(--az-accent); }

.az-case__steps li > span:last-child {
	color: var(--az-muted);
	font-size: 0.875rem;
}

.az-case__step-num {
	color: var(--az-accent);
	font-family: var(--az-font-mono);
	font-size: 1.375rem;
}

/* Stack chips */
.az-case__chips {
	align-content: flex-start;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Gallery */
.az-case__gallery {
	display: grid;
	gap: 20px;
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 768px) {
	.az-case__gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.az-case__gallery figure:first-child:nth-last-child(odd) { grid-column: 1 / -1; }

	/* Desktop shot (2/3) next to a mobile shot (1/3). */
	.az-case__gallery--mixed { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.az-case__gallery--mixed .az-case__shot--desktop,
	.az-case__gallery--mixed figure:first-child:nth-last-child(odd).az-case__shot--desktop { grid-column: span 2; }
	.az-case__gallery--mixed .az-case__shot--mobile { grid-column: span 1; }
}

.az-case__gallery figure {
	align-self: start;
	background: var(--az-surface);
	border: 1px solid var(--az-border);
	border-radius: 18px;
	margin: 0;
	overflow: hidden;
}

.az-case__gallery img {
	display: block;
	height: auto;
	width: 100%;
}

/* Mobile shots on their own stay phone-sized. */
.az-case__shot--mobile { justify-self: center; max-width: 420px; width: 100%; }

/* Full-page screenshots: fixed-height window that scrolls. */
.az-case__shot-scroll {
	max-height: 560px;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-color: var(--az-accent) transparent;
	scrollbar-width: thin;
}

@media (min-width: 1024px) {
	.az-case__shot-scroll { max-height: 640px; }
}

.az-case__shot-scroll:focus-visible {
	outline: 2px solid var(--az-accent-light);
	outline-offset: -2px;
}

.az-case__shot-hint {
	border-top: 1px solid var(--az-border-soft);
	color: var(--az-subtle);
	font-family: var(--az-font-mono);
	font-size: 0.75rem;
	padding: 10px 14px;
}

/* Pager */
.az-case__pager-wrap { padding-block: 48px; }

.az-case__pager {
	display: grid;
	gap: 20px;
	grid-template-columns: minmax(0, 1fr);
}

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

.az-case__pager-link {
	border: 1px solid var(--az-border);
	border-radius: 18px;
	color: var(--az-text);
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 24px;
	text-decoration: none;
	transition: border-color 0.2s var(--az-ease), background-color 0.2s var(--az-ease);
}

.az-case__pager-link:hover,
.az-case__pager-link:focus {
	background: var(--az-surface);
	border-color: var(--az-accent);
	color: var(--az-text);
}

.az-case__pager-link span { color: var(--az-subtle); font-size: 0.8125rem; }
.az-case__pager-link strong { font-size: 1.25rem; }

@media (min-width: 768px) {
	.az-case__pager-link--next { grid-column: 2; text-align: right; }
}

/* CTA */
.az-case__cta-wrap { padding-block: 24px 96px; }

.az-case__cta {
	align-items: center;
	background: var(--az-surface);
	border: 2px solid var(--az-accent);
	border-radius: var(--az-radius-lg);
	display: flex;
	flex-wrap: wrap;
	gap: 28px;
	justify-content: space-between;
	padding: 28px;
}

@media (min-width: 768px) {
	.az-case__cta { padding: 44px; }
}

.az-case__cta h2 {
	font-size: clamp(1.5rem, 1.2rem + 1vw, 2.25rem);
	margin: 0 0 8px;
}

.az-case__cta p {
	color: var(--az-muted);
	margin: 0;
}

/* ---------- Archive ---------- */
.az-archive__section { padding-block: 56px 96px; }
