/* ==========================================================================
   Projects (stacked cards / slider), deliverables, service + project pages.
   ========================================================================== */

.projects { padding-block: clamp(80px, 10vw, 150px); }
.projects__text { max-width: 520px; margin: -32px auto 48px; text-align: center; color: var(--muted); }
.projects--slider .projects__text { margin: -24px 0 40px; text-align: left; }

/* Stacked cards: each card sticks a little lower than the previous ------ */
.stack { display: grid; gap: 24px; }
.stack__card { position: sticky; top: calc(var(--header-h) + 24px + var(--i) * 18px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: auto 1fr auto; min-height: min(56vh, 460px); padding: clamp(16px, 2vw, 22px); border-radius: var(--radius); background: var(--gray); box-shadow: 0 -10px 30px -20px rgba(0, 0, 0, .25); transform-origin: 50% 0; }
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.stack__card { animation: dh-stack linear both; animation-timeline: view(); animation-range: exit-crossing 0% exit-crossing 100%; }
		@keyframes dh-stack { to { transform: scale(.92); filter: brightness(.9); } }
	}
}
.stack__media { position: relative; grid-column: 2; grid-row: 1 / -1; display: block; overflow: hidden; border-radius: 10px; background: var(--gray-2); }
.stack__media img, .stack__media .dh-placeholder { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.stack__card:hover .stack__media img { transform: scale(1.05); }
.stack__badge { grid-column: 1; grid-row: 3; align-self: end; justify-self: start; display: flex; margin-right: 16px; background: var(--white); font-size: 20px; font-weight: 700; line-height: 1.1; }
.stack__badge b { display: grid; padding: 10px 14px; background: var(--black); color: var(--white); }
.stack__badge > span { display: grid; padding: 10px 14px; }
.stack__badge small { font-size: 11px; font-weight: 400; text-transform: uppercase; opacity: .7; }
.stack__card .pill { grid-column: 3; grid-row: 1; justify-self: start; margin-left: 16px; }
.stack__name { grid-column: 3; grid-row: 3; align-self: end; margin-left: 16px; font-size: clamp(22px, 2.2vw, 32px); font-weight: 800; line-height: 1.1; letter-spacing: -.03em; }
.stack__name small { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 400; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.projects__more { margin-top: 40px; text-align: center; }

/* Image overlay layer (colour set in Elementor → Style → Image overlay) */
.stack__media::after, .ps__frame::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; }

/* Slider (service pages) ------------------------------------------------ */
.projects--slider { background: var(--gray); }
.projects--slider .head__title { font-size: clamp(44px, 7vw, 112px); }
.ps { --dir: 1; position: relative; outline: none; }
.ps__track { touch-action: pan-y; }
.ps__slide { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(16px, 2vw, 24px); align-items: stretch; }
.ps__slide + .ps__slide { margin-top: 64px; }
.ps__info { display: grid; align-content: space-between; gap: 32px; padding: clamp(20px, 2.6vw, 32px); border-radius: var(--radius); background: var(--white); }
.ps__tag { display: inline-flex; margin: 0 0 22px; background: var(--gray); font-size: 13px; font-weight: 700; }
.ps__tag span { padding: 6px 10px; background: var(--black); color: var(--white); text-transform: uppercase; }
.ps__tag { gap: 10px; padding-right: 10px; align-items: center; }
.ps__name { font-size: clamp(34px, 4vw, 60px); line-height: 1; letter-spacing: -.045em; text-transform: uppercase; }
.ps__name a:hover { color: var(--blue); }
.ps__excerpt { margin-top: 14px; color: var(--muted); }
.ps__body { display: grid; gap: 24px; justify-items: start; }
.ps__media { position: relative; }
.ps__frame { position: relative; display: block; height: 100%; min-height: 420px; overflow: hidden; border-radius: var(--radius); background: var(--black); }
.ps__frame img, .ps__frame .dh-placeholder { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.ps__badge { position: absolute; left: 16px; bottom: 16px; }

.ps.is-ready .ps__track { display: grid; }
.ps.is-ready .ps__slide { grid-area: 1 / 1; margin: 0; visibility: hidden; transition: visibility 0s .9s; }
.ps.is-ready .ps__slide.is-active { visibility: visible; transition-delay: 0s; }
.ps.is-ready .ps__part { opacity: 0; filter: blur(8px); transform: translate3d(calc(var(--dir) * 64px), 0, 0); transition: opacity .6s var(--ease), filter .6s var(--ease), transform .9s var(--ease); }
.ps.is-ready .is-active .ps__part { opacity: 1; filter: none; transform: none; transition-delay: calc(var(--p) * 90ms + 120ms); }
.ps.is-ready .is-leaving .ps__part { transform: translate3d(calc(var(--dir) * -64px), 0, 0); transition-delay: calc(var(--p) * 50ms); }
.ps.is-ready .ps__frame img { transform: scale(1.1); }
.ps.is-ready .is-active .ps__frame img { transform: none; }
@media (prefers-reduced-motion: reduce) { .ps.is-ready .ps__part { transform: none !important; filter: none !important; } }

.ps__nav { display: flex; align-items: center; gap: 8px; margin-top: 20px; }
.ps__arrow { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--white); cursor: pointer; transition: background .3s, color .3s; }
.ps__arrow svg { width: 16px; height: 16px; }
.ps__arrow:hover { background: var(--blue); color: var(--white); }
.ps__dots { display: flex; gap: 6px; flex: 1; margin-left: 16px; }
.ps__dots button { position: relative; width: 44px; height: 20px; padding: 0; border: 0; background: none; cursor: pointer; }
.ps__dots button::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 3px; border-radius: 3px; background: var(--gray-2); transition: background .4s; }
.ps__dots button[aria-current="true"]::before { background: var(--blue); }
.ps__count { margin: 0; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.ps__count b { color: var(--black); }

/* Deliverables ---------------------------------------------------------- */
.deliverables { position: relative; display: grid; gap: 10px; width: 100%; margin: 0; padding: 0; list-style: none; }
.deliverables::before { content: ""; position: absolute; left: 14px; top: 14px; bottom: 14px; width: 1px; background: var(--line); }
.deliverables li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 14px; align-items: start; }
.deliverables__num { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: var(--white); font-size: 12px; font-weight: 700; }
.deliverables h4 { padding-top: 3px; font-size: 16px; letter-spacing: -.01em; }
.deliverables p { margin-top: 1px; font-size: 13px; line-height: 1.5; color: var(--muted); }

/* Service overview ------------------------------------------------------ */
.svc-overview { padding-block: clamp(72px, 9vw, 130px); }
.svc-overview__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 5vw, 96px); align-items: start; }
.svc-overview .prose { max-width: 900px; font-size: clamp(20px, 1.9vw, 28px); font-weight: 700; line-height: 1.45; letter-spacing: -.015em; color: var(--black); }
.svc-overview__aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 12px; justify-items: start; padding: 24px; border-radius: var(--radius); background: var(--gray); }
.svc-overview__aside p:not(.label) { color: var(--muted); font-size: 15px; }

/* Project page ---------------------------------------------------------- */
.project-body { padding-block: clamp(72px, 9vw, 130px); }
.project-body__grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(32px, 5vw, 96px); align-items: start; }
.project-body__main { display: grid; gap: 28px; }
.project-body__main > .label { margin-bottom: -8px; }
.facts { position: sticky; top: calc(var(--header-h) + 24px); margin: 0; padding: 8px 22px; border-radius: var(--radius); background: var(--gray); }
.facts > div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts > div:last-child { border: 0; }
.facts dt { font-size: 12px; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-weight: 700; }
.next-project { display: block; padding-block: clamp(72px, 9vw, 140px); background: var(--black); color: var(--white); transition: background .5s; }
.next-project:hover { background: var(--blue); }
.next-project .shell { display: block; }
.next-project .label { opacity: .7; }
.next-project__title { display: flex; align-items: center; gap: .3em; font-size: clamp(44px, 8vw, 128px); font-weight: 800; line-height: 1; letter-spacing: -.045em; text-transform: uppercase; }
.next-project__title svg { width: .5em; height: .5em; transition: transform .7s var(--ease); }
.next-project:hover .next-project__title svg { transform: translateX(.2em); }

@media (max-width: 960px) {
	.stack__card { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto; gap: 14px; min-height: 0; }
	.stack__media { grid-column: 1 / -1; grid-row: 2; aspect-ratio: 4 / 3; }
	.stack__badge { grid-column: 1; grid-row: 3; margin: 0; }
	.stack__card .pill { grid-column: 2; grid-row: 1; margin: 0; justify-self: end; }
	.stack__name { grid-column: 1; grid-row: 1; margin: 0; }
	.ps__slide { grid-template-columns: minmax(0, 1fr); }
	.ps__media { order: -1; }
	.ps__frame { min-height: 0; aspect-ratio: 4 / 3; }
	.svc-overview__grid, .project-body__grid { grid-template-columns: minmax(0, 1fr); }
	.svc-overview__aside, .facts { position: static; }
}
@media (max-width: 640px) {
	.ps__dots { display: none; }
	.ps__count { margin-left: auto; }
}
