/* ---------- Portfolio page (scoped to .pf) ---------- */
.pf {
	--ink: #0b1417;
	--ink-2: #13222a;
	--paper: #f5f6f7;
	--line: #e3e7ea;
	--muted: #5b6870;
	--red: #e31e24;
	--amber: #f8ae56;
	--display: 'Bricolage Grotesque', 'Poppins', sans-serif;
	--mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
	background: #fff;
	color: var(--ink);
}
.pf *, .pf *::before, .pf *::after { box-sizing: border-box; }
.pf a:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
.pf-eyebrow {
	font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
	color: var(--red); display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
}
.pf-eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--gradient, var(--red)); }

/* Hero */
.pf-hero {
	position: relative; overflow: hidden; background: var(--ink); color: #fff;
	padding: 200px 0 96px;
}
.pf-hero::before { /* blueprint grid */
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background-image:
		linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
	background-size: 56px 56px;
	mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
	-webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
}
.pf-hero::after { /* brand glow */
	content: ""; position: absolute; width: 640px; height: 640px; right: -180px; top: -160px; pointer-events: none;
	background: radial-gradient(circle, rgba(227,30,36,.35), rgba(248,174,86,.12) 45%, transparent 70%);
}
.pf-hero .container { position: relative; z-index: 1; }
.pf-hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 64px; align-items: end; }
.pf-hero h1 {
	font-family: var(--display); font-weight: 800; color: #fff;
	font-size: clamp(40px, 5.6vw, 76px); line-height: .98; letter-spacing: -.035em; margin: 0 0 26px;
}
.pf-hero h1 em {
	font-style: normal;
	background: linear-gradient(90deg, var(--red), var(--amber));
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
.pf-lede { font-size: 18px; line-height: 1.65; color: rgba(255,255,255,.72); max-width: 34em; margin: 0; }

.pf-index { border-top: 1px solid rgba(255,255,255,.14); margin: 0; padding: 0; list-style: none; }
.pf-index-label { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.5); margin: 0 0 10px; }
.pf-index li { border-bottom: 1px solid rgba(255,255,255,.14); }
.pf-index a {
	display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
	padding: 11px 4px; color: #fff; text-decoration: none; transition: padding .25s ease, color .25s ease;
}
.pf-index a span:first-child { font-family: var(--display); font-weight: 600; font-size: 19px; }
.pf-index a span:last-child { font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,.55); white-space: nowrap; }
.pf-index a:hover { padding-left: 14px; color: var(--amber); }
.pf-index a:hover span:last-child { color: rgba(255,255,255,.85); }

/* Work grid */
.pf-work { padding: 110px 0 90px; background: var(--paper); }
.pf-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 48px; flex-wrap: wrap; }
.pf h2.pf-title {
	font-family: var(--display); font-weight: 700; color: var(--ink);
	font-size: clamp(30px, 3.6vw, 48px); line-height: 1.05; letter-spacing: -.03em; margin: 0; max-width: 16em;
}
.pf-head p { margin: 0; max-width: 30em; color: var(--muted); font-size: 16px; line-height: 1.6; }

.pf-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.pf-card { grid-column: span 6; }
.pf-card.w7 { grid-column: span 7; }
.pf-card.w5 { grid-column: span 5; }
.pf-card {
	position: relative; display: flex; flex-direction: column; background: #fff;
	border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
	transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, border-color .35s ease;
	scroll-margin-top: 120px;
}
.pf-card:hover { transform: translateY(-6px); box-shadow: 0 28px 60px -28px rgba(11,20,23,.35); border-color: transparent; }
.pf-plate {
	position: relative; height: 230px; display: grid; place-items: center; padding: 36px;
	background:
		radial-gradient(circle at 85% 15%, rgba(248,174,86,.16), transparent 45%),
		linear-gradient(180deg, #fff, #f1f3f5);
	border-bottom: 1px solid var(--line);
}
.pf-plate img { max-height: 92px; max-width: 70%; object-fit: contain; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.pf-plate img.round { max-height: 120px; border-radius: 18px; }
.pf-card:hover .pf-plate img { transform: scale(1.06); }
.pf-tag {
	position: absolute; top: 18px; left: 18px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
	background: var(--ink); color: #fff; padding: 6px 11px; border-radius: 999px;
}
.pf-body { padding: 28px 30px 30px; display: flex; flex-direction: column; flex: 1; }
.pf-body h3 { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -.02em; margin: 0 0 10px; color: var(--ink); }
.pf-body p { color: var(--muted); font-size: 15.5px; line-height: 1.65; margin: 0 0 22px; }
.pf-stack { display: flex; flex-wrap: wrap; gap: 8px; margin: auto 0 22px; padding: 0; list-style: none; }
.pf-stack li { font-family: var(--mono); font-size: 12px; padding: 5px 10px; border-radius: 8px; background: var(--paper); border: 1px solid var(--line); color: var(--ink-2); }
.pf-link {
	display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: none;
}
.pf-link::after { content: ""; position: absolute; inset: 0; border-radius: 22px; } /* whole card clickable */
.pf-link i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 13px; transition: background .3s ease, transform .3s ease; }
.pf-card:hover .pf-link i { background: var(--red); transform: rotate(-45deg); }
.pf-card:hover .pf-link { color: var(--red); }

/* Quotes */
.pf-quotes { background: var(--ink); color: #fff; padding: 110px 0; }
.pf-quotes h2.pf-title { color: #fff; }
.pf-quotes .pf-head p { color: rgba(255,255,255,.6); }
.pf-qgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pf-q {
	margin: 0; padding: 34px 30px 30px; border-radius: 22px; background: var(--ink-2); border: 1px solid rgba(255,255,255,.08);
	display: flex; flex-direction: column; position: relative;
}
.pf-q::before { content: "\201C"; font-family: var(--display); font-size: 84px; line-height: .6; height: 34px; color: var(--red); }
.pf-q blockquote { margin: 0 0 28px; font-size: 16.5px; line-height: 1.7; color: rgba(255,255,255,.86); flex: 1; padding: 0; border: 0; background: none; }
.pf-q figcaption { display: flex; align-items: center; gap: 14px; font-family: var(--display); font-weight: 600; font-size: 17px; }
.pf-q figcaption img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.15); }

/* Deck band */
.pf-deck { padding: 90px 0 30px; background: #fff; }
.pf-deck-box {
	display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center;
	padding: 52px 56px; border-radius: 28px; background: var(--paper); border: 1px solid var(--line); position: relative; overflow: hidden;
}
.pf-deck-box::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: linear-gradient(180deg, var(--red), var(--amber)); }
.pf-deck-box p { color: var(--muted); font-size: 16px; line-height: 1.6; margin: 14px 0 0; max-width: 32em; }
.pf-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.pf-btn {
	display: inline-flex; align-items: center; gap: 10px; padding: 15px 26px; border-radius: 999px; font-weight: 600; font-size: 15px;
	text-decoration: none; transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
}
.pf-btn.solid { background: var(--ink); color: #fff; }
.pf-btn.solid:hover { background: var(--red); color: #fff; transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(227,30,36,.6); }
.pf-btn.ghost { border: 1.5px solid var(--ink); color: var(--ink); }
.pf-btn.ghost:hover { background: var(--ink); color: #fff; }

/* Reveal */
.pf-reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.pf-reveal.in { opacity: 1; transform: none; }
.no-js .pf-reveal { opacity: 1; transform: none; }

@media (max-width: 991px) {
	.pf-hero { padding: 160px 0 72px; }
	.pf-hero-grid, .pf-deck-box { grid-template-columns: 1fr; gap: 40px; }
	.pf-card, .pf-card.w7, .pf-card.w5 { grid-column: span 12; }
	.pf-qgrid { grid-template-columns: 1fr; }
	.pf-actions { justify-content: flex-start; }
	.pf-work, .pf-quotes { padding: 80px 0; }
}
@media (min-width: 768px) and (max-width: 991px) {
	.pf-card, .pf-card.w7, .pf-card.w5 { grid-column: span 6; }
}
@media (max-width: 575px) {
	.pf-plate { height: 190px; }
	.pf-body { padding: 24px 22px 24px; }
	.pf-deck-box { padding: 36px 26px; }
	.pf-index a span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.pf *, .pf *::before, .pf *::after { transition: none !important; }
	.pf-reveal { opacity: 1; transform: none; }
}

/* ---------- AI product cards on the portfolio grid ---------- */
.pf-card.w4 { grid-column: span 4; }
.pf-plate.ai {
	background:
		radial-gradient(circle at 15% 20%, rgba(227,30,36,.10), transparent 45%),
		radial-gradient(circle at 85% 80%, rgba(248,174,86,.18), transparent 50%),
		linear-gradient(180deg, #fff, #f1f3f5);
}
.pf-tag.ai { background: linear-gradient(90deg, var(--red), var(--amber)); }
.pf-group { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; margin: 8px 0 -4px; }
.pf-group::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pf-group:not(:first-child) { margin-top: 40px; }

/* ---------- Case study pages ---------- */
.cs-crumbs { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: rgba(255,255,255,.55); margin: 0 0 26px; }
.cs-crumbs a { color: rgba(255,255,255,.8); text-decoration: none; }
.cs-crumbs a:hover { color: var(--amber); }
.cs-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }
.cs-hero-grid.stack { grid-template-columns: minmax(0, 1fr); gap: 64px; }
.cs-hero-grid.stack > div:first-child { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: 64px; align-items: end; }
.cs-hero-grid.stack > div:first-child > .pf-eyebrow, .cs-hero-grid.stack > div:first-child > h1 { grid-column: 1 / -1; }
.cs-hero-grid.stack > div:first-child > .pf-lede { grid-column: 1; grid-row: 3 / span 2; align-self: start; }
.cs-hero-grid.stack > div:first-child > .cs-meta { grid-column: 2; grid-row: 3; margin-top: 0; }
.cs-hero-grid.stack > div:first-child > .pf-actions { grid-column: 2; grid-row: 4; }
.cs-hero-grid.stack .cs-shot { max-width: 1120px; width: 100%; margin: 0 auto; }
.pf-hero .cs-hero-grid h1 { font-size: clamp(40px, 5vw, 68px); }
.cs-meta { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 12px 36px; margin: 32px 0 34px; padding: 22px 0 0; border-top: 1px solid rgba(255,255,255,.14); list-style: none; }
.cs-meta dt { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-bottom: 4px; font-weight: 500; }
.cs-meta dd { margin: 0; color: #fff; font-weight: 500; font-size: 15px; }
.cs-meta a { color: var(--amber); text-decoration: none; }
.cs-meta a:hover { text-decoration: underline; }
.pf-hero .pf-btn.ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.pf-hero .pf-btn.ghost:hover { background: #fff; color: var(--ink); }
.pf-hero .pf-btn.solid { background: #fff; color: var(--ink); }
.pf-hero .pf-btn.solid:hover { background: var(--red); color: #fff; }

.cs-shot { border-radius: 16px; background: #fff; padding: 30px 8px 8px; position: relative; box-shadow: 0 40px 80px -30px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08); transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s ease; }
.cs-shot:hover { transform: translateY(-4px); box-shadow: 0 50px 90px -30px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.12); }
.cs-shot::before { content: ""; position: absolute; top: 13px; left: 16px; width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; box-shadow: 15px 0 0 #febc2e, 30px 0 0 #28c840; }
.cs-shot img { display: block; width: 100%; height: auto; border-radius: 8px; }
.cs-shot a { display: block; cursor: zoom-in; }

.cs-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: end; }
.cs-duo figure { margin: 0; position: relative; }
.cs-duo figure:last-child { transform: translateY(-36px); }
.cs-duo img { width: 100%; height: auto; border-radius: 22px; display: block; box-shadow: 0 30px 60px -30px rgba(0,0,0,.7); }
.cs-duo figcaption { position: absolute; left: 14px; bottom: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; background: rgba(11,20,23,.85); color: #fff; padding: 6px 10px; border-radius: 999px; }

.cs-section { padding: 100px 0; }
.cs-section.alt { background: var(--paper); }
.cs-brief { display: grid; grid-template-columns: 1fr 1.3fr; gap: 64px; align-items: start; }
.cs-brief p { font-size: 17px; line-height: 1.75; color: var(--muted); margin: 0 0 18px; }
.cs-brief p:first-child { color: var(--ink); font-size: 19px; }

.cs-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 0; padding: 0; list-style: none; }
.cs-feats li { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px 24px; transition: border-color .3s ease, transform .3s ease; }
.cs-feats li:hover { border-color: var(--red); transform: translateY(-3px); }
.cs-feats i { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(227,30,36,.08); color: var(--red); font-size: 18px; margin-bottom: 16px; }
.cs-feats h3 { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.01em; margin: 0 0 8px; color: var(--ink); }
.cs-feats p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

.cs-steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.cs-steps li { counter-increment: step; padding: 22px 22px 0 0; position: relative; }
.cs-steps li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--mono); font-size: 13px; color: var(--red); margin-bottom: 14px; }
.cs-steps li::after { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px #fff; }
.cs-section.alt .cs-steps li::after { box-shadow: 0 0 0 4px var(--paper); }
.cs-steps h3 { font-family: var(--display); font-weight: 700; font-size: 18px; margin: 0 0 6px; color: var(--ink); }
.cs-steps p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }

.cs-eng { display: grid; grid-template-columns: 1fr 1.3fr; gap: 64px; }
.cs-stack { display: grid; gap: 14px; margin: 0; }
.cs-stack div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cs-stack dt { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding-top: 3px; }
.cs-stack dd { margin: 0; font-weight: 500; color: var(--ink); }
.cs-notes { margin: 0; padding: 0; list-style: none; display: grid; gap: 22px; }
.cs-notes h3 { font-family: var(--display); font-weight: 700; font-size: 19px; margin: 0 0 6px; color: var(--ink); }
.cs-notes p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.65; }

.cs-next { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.cs-next a { color: var(--ink); text-decoration: none; font-weight: 600; }
.cs-next a:hover { color: var(--red); }

@media (max-width: 991px) {
	.pf-card.w4 { grid-column: span 6; }
	.cs-hero-grid, .cs-brief, .cs-eng { grid-template-columns: 1fr; gap: 40px; }
	.cs-feats { grid-template-columns: 1fr 1fr; }
	.cs-shot { transform: none; }
	.cs-section { padding: 72px 0; }
}
@media (max-width: 767px) {
	.pf-card.w4 { grid-column: span 12; }
	.cs-feats { grid-template-columns: 1fr; }
	.cs-meta { grid-template-columns: 1fr 1fr; }
	.cs-steps { grid-template-columns: 1fr; border-top: 0; border-left: 2px solid var(--ink); }
	.cs-steps li { padding: 0 0 26px 24px; }
	.cs-steps li::after { top: 2px; left: -7px; }
	.cs-stack div { grid-template-columns: 1fr; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
	.cs-shot { transform: none; }
}
@media (max-width: 991px) {
	.cs-hero-grid.stack > div:first-child { display: block; }
	.cs-hero-grid.stack > div:first-child > .cs-meta { margin-top: 32px; }
}

/* ---------- Projects page (product.html) ---------- */
.pj-jump { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.pj-jump a { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); color: #fff; text-decoration: none; font-weight: 500; font-size: 15px; transition: background .25s ease, border-color .25s ease; }
.pj-jump a span { font-family: var(--mono); font-size: 12px; color: var(--amber); }
.pj-jump a:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.5); color: #fff; }

.pj-spots { padding: 110px 0 40px; background: #fff; }
.pj-spot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 72px; align-items: center; padding: 56px 0; border-top: 1px solid var(--line); scroll-margin-top: 110px; }
.pj-spot:first-of-type { border-top: 0; padding-top: 24px; }
.pj-spot.flip > :first-child { order: 2; }
.pj-num { font-family: var(--mono); font-size: 13px; color: var(--muted); display: block; margin-bottom: 18px; }
.pj-logo { height: 34px; width: auto; display: block; margin-bottom: 22px; }
.pj-spot h3 { font-family: var(--display); font-weight: 700; font-size: clamp(26px, 2.8vw, 36px); line-height: 1.12; letter-spacing: -.025em; margin: 0 0 16px; color: var(--ink); }
.pj-spot > div > p { color: var(--muted); font-size: 16.5px; line-height: 1.7; margin: 0 0 22px; }
.pj-points { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; }
.pj-points li { position: relative; padding-left: 28px; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.pj-points li::before { content: ""; position: absolute; left: 0; top: 7px; width: 14px; height: 8px; border-left: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: rotate(-45deg); }
.pj-spot .pf-stack { margin: 0 0 28px; }
.pj-links { display: flex; flex-wrap: wrap; gap: 12px; }
.pj-links .pf-btn { padding: 13px 22px; font-size: 14.5px; }
.pj-visual { position: relative; }
.pj-visual::before { content: ""; position: absolute; inset: 8% -4% -6% 10%; border-radius: 28px; background: linear-gradient(135deg, rgba(227,30,36,.14), rgba(248,174,86,.22)); z-index: 0; }
.pj-spot.flip .pj-visual::before { inset: 8% 10% -6% -4%; }
.pj-visual > * { position: relative; z-index: 1; }
.pj-visual .cs-shot { transform: none; }
.pj-visual .cs-duo figure:last-child { transform: translateY(-28px); }

.pj-work { padding: 100px 0; background: var(--paper); }
.pj-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 36px; padding: 0; list-style: none; }
.pj-filters button { font: 500 14px/1 'Poppins', sans-serif; padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.pj-filters button span { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-left: 6px; }
.pj-filters button:hover { border-color: var(--ink); }
.pj-filters button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.pj-filters button[aria-pressed="true"] span { color: var(--amber); }
.pj-filters button:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.pj-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.pj-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease; }
.pj-card[hidden] { display: none; }
.pj-card:hover { transform: translateY(-6px); box-shadow: 0 28px 60px -28px rgba(11,20,23,.35); }
.pj-cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ink); }
.pj-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.pj-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(11,20,23,.55)); }
.pj-card:hover .pj-cover img { transform: scale(1.06); }
.pj-cover .pf-tag { z-index: 1; }
.pj-card .pf-body h3 { font-size: 21px; }
.pj-card .pf-body p { font-size: 15px; }

@media (max-width: 991px) {
	.pj-spot, .pj-spot.flip { grid-template-columns: 1fr; gap: 40px; }
	.pj-spot.flip > :first-child { order: 0; }
	.pj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pj-spots { padding-top: 72px; }
	.pj-work { padding: 72px 0; }
}
@media (max-width: 575px) {
	.pj-grid { grid-template-columns: 1fr; }
}

/* ---------- Case study: extra hero visuals ---------- */
.cs-logo-card { position: relative; border-radius: 26px; background: #fff; aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 14%; box-shadow: 0 40px 80px -30px rgba(0,0,0,.6); overflow: hidden; }
.cs-logo-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 12%, rgba(248,174,86,.22), transparent 45%), radial-gradient(circle at 10% 90%, rgba(227,30,36,.12), transparent 45%); }
.cs-logo-card img { position: relative; max-width: 100%; max-height: 150px; width: auto; height: auto; object-fit: contain; }
.cs-logo-card img.round { max-height: 210px; border-radius: 28px; }
.cs-photo { margin: 0; position: relative; }
.cs-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 26px; display: block; box-shadow: 0 40px 80px -30px rgba(0,0,0,.6); }
.cs-photo figcaption { position: absolute; left: 16px; bottom: 16px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; background: rgba(11,20,23,.85); color: rgba(255,255,255,.85); padding: 6px 10px; border-radius: 999px; }

/* ---------- Case study: challenges ---------- */
.cs-challenges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.cs-challenges li { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px 28px 26px; display: grid; gap: 14px; align-content: start; }
.cs-challenges h3 { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.01em; margin: 0; color: var(--ink); }
.cs-challenges p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--muted); }
.cs-challenges b { display: block; font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 4px; }
.cs-challenges .prob b { color: var(--muted); }
.cs-challenges .sol { padding-top: 14px; border-top: 1px dashed var(--line); }
.cs-challenges .sol b { color: var(--red); }
.cs-challenges .sol { color: var(--ink-2); }

/* ---------- Case study: outcomes ---------- */
.cs-outcomes { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.cs-outcomes li { position: relative; padding: 16px 18px 16px 52px; background: #fff; border: 1px solid var(--line); border-radius: 14px; font-weight: 500; color: var(--ink); line-height: 1.5; }
.cs-outcomes li::before { content: "\f00c"; font-family: FontAwesome; position: absolute; left: 16px; top: 15px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; color: #fff; background: linear-gradient(135deg, var(--red), var(--amber)); }

/* ---------- Case study: related projects ---------- */
.cs-related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }

/* ---------- Portfolio hero: grouped index ---------- */
.pf-groups { display: grid; gap: 22px; margin: 0; padding: 0; list-style: none; }
.pf-groups li { border-top: 1px solid rgba(255,255,255,.14); padding-top: 16px; }
.pf-groups b { display: flex; justify-content: space-between; font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-bottom: 10px; }
.pf-groups b span { color: var(--amber); }
.pf-groups p { margin: 0; line-height: 1.9; }
.pf-groups a { display: inline-block; color: #fff; text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 16px; }
.pf-groups a:hover { color: var(--amber); }
.pf-groups i { font-style: normal; color: rgba(255,255,255,.3); margin: 0 8px; }

@media (max-width: 991px) {
	.cs-challenges { grid-template-columns: 1fr; }
	.cs-related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
	.cs-related { grid-template-columns: 1fr; }
	.cs-logo-card { aspect-ratio: 16 / 10; }
}
.cs-related .pf-card, .cs-related .pf-card.w4, .cs-related .pf-card.w5, .cs-related .pf-card.w7 { grid-column: auto; }
.cs-related .pf-plate { height: 190px; }
