/* ==========================================================================
   Projects page (Figma 1:24). Design coordinates: 1rem = 10px at 1728px.
   ========================================================================== */

/* ---------- 01 Hero – the copy sits a little lower on this page ---------- */
.tpl-projects .hero-box__copy { top: 23.25rem; }

/* ---------- 04 Featured case study ---------- */
.pj-feature { position: relative; display: grid; grid-template-columns: 60rem 64rem; column-gap: 14rem; align-items: start; padding: 14rem 0 14.1rem 15.4rem; overflow: hidden;
	background: radial-gradient(60.48rem 36.1rem at 103.68rem 100%, rgba(15, 51, 102, .08), transparent),
		radial-gradient(69.12rem 50.54rem at 146.88rem 21.66rem, rgba(110, 194, 227, .24), transparent),
		radial-gradient(60.48rem 50.54rem at 25.92rem 28.88rem, rgba(249, 112, 20, .22), transparent), #fff; }
.pj-feature__media { position: relative; width: 60rem; height: 44rem; margin-top: .1rem; }
.pj-feature__img { --cut: 3rem; position: absolute; inset: 0; display: block; overflow: hidden; clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); transition: clip-path .9s var(--ease-out); }
.pj-feature__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.pj-feature__media:hover .pj-feature__img { --cut: 5.6rem; }
.pj-feature__media:hover .pj-feature__img img { transform: scale(1.08); }
.pj-feature__copy .eyebrow { margin-bottom: 1.6rem; }
.pj-feature__title { width: 64rem; font-size: 6rem; line-height: 6.6rem; letter-spacing: -.03em; color: var(--text-strong); }
.pj-feature__text { width: 58rem; margin-top: 2.2rem; color: var(--text-strong); }
.pj-feature__stats { display: flex; gap: 4rem; margin-top: 3.2rem; }
.pj-feature__stat { display: flex; gap: 1.6rem; align-items: flex-start; }
.pj-feature__stat strong { font-family: var(--f-head); font-weight: 600; font-size: 3.2rem; line-height: 3.5rem; letter-spacing: -.02em; color: var(--orange); white-space: nowrap; }
.pj-feature__stat span { width: 24rem; font-size: var(--t-body); line-height: 2.4rem; color: var(--text-strong); }
.pj-feature .btn-row { margin-top: 3.6rem; }

/* ---------- 02 Project grid ---------- */
.pj-grid { position: relative; padding: 12rem 0 15rem; color: #fff;
	background: radial-gradient(51.84rem 81.2rem at 17.28rem 146.16rem, rgba(249, 112, 20, .07), transparent),
		radial-gradient(60.48rem 97.44rem at 155.52rem 113.68rem, rgba(110, 194, 227, .08), transparent),
		radial-gradient(77.76rem 64.96rem at 50% 0, rgba(249, 112, 20, .1), transparent), var(--canvas); }
.pj-grid__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 4rem; }
.pj-grid__title { width: 70rem; font-size: 6rem; line-height: 6.6rem; }
.pj-filter { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 1rem; margin-top: 2rem; }
.pj-filter__btn { position: relative; overflow: hidden; isolation: isolate; padding: 1.1rem 2.1rem; border: 1px solid rgba(255, 255, 255, .18); border-radius: 80px; background: rgba(255, 255, 255, .06); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
	font-family: var(--f-head); font-weight: 600; font-size: max(1.6rem, 14px); line-height: 2rem; letter-spacing: -.005em; color: #fff; white-space: nowrap; transition: border-color .4s, transform .5s var(--ease-out); }
/* orange fill sweeps up from the bottom on hover / when active */
.pj-filter__btn::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; background: var(--orange); clip-path: inset(100% 0 0 0 round 80px); transition: clip-path .6s var(--ease-out); }
.pj-filter__btn:hover { border-color: rgba(249, 112, 21, .7); }
.pj-filter__btn:hover::before { clip-path: inset(70% 0 0 0 round 80px); }
.pj-filter__btn.is-active { border-color: var(--orange); }
.pj-filter__btn.is-active::before { clip-path: inset(0 0 0 0 round 80px); }
.pj-filter__btn:active { transform: scale(.96); }

.pj-grid__cards { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 11.4rem 3.2rem; margin-top: 7.4rem; }
.js .proj-card.is-over, .proj-card.is-hidden { display: none; }
.pj-grid__empty { margin-top: 6rem; text-align: center; color: var(--text-muted-inv); }
.pj-grid__more { display: flex; justify-content: center; margin-top: 4rem; }
.pj-grid__more[hidden] { display: none; }

/* Project card (also used for “More projects” on the case study) */
.proj-card { position: relative; display: block; color: #fff; will-change: transform; }
.proj-card__media { --cut: 2.4rem; position: relative; display: block; height: 38rem; overflow: hidden; clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cut)); transition: clip-path .8s var(--ease-out); }
.proj-card__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.001); transition: transform 1.2s var(--ease-out); }
.proj-card__fade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 31, 59, 0) 55%, rgba(10, 31, 59, .55) 100%); transition: opacity .6s; }
.proj-card__tags { position: absolute; left: 2rem; bottom: 2rem; display: flex; flex-wrap: wrap; gap: .8rem; }
.proj-card__tags span { padding: .5rem 1.1rem; border: 1px solid rgba(255, 255, 255, .18); border-radius: 80px; background: rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: var(--t-caption); line-height: 1.6rem; transition: background .4s, border-color .4s; }
.proj-card__meta { display: block; margin-top: 2.4rem; font-size: var(--t-small); line-height: 2rem; color: var(--text-muted-inv); white-space: pre; }
.proj-card__title { margin-top: .8rem; font-size: max(2.6rem, 19px); line-height: 3.2rem; letter-spacing: -.015em; }
.proj-card__title span { background: linear-gradient(var(--orange), var(--orange)) 0 100% / 0 2px no-repeat; transition: background-size .6s var(--ease-out); }
.proj-card__more { display: flex; gap: 1rem; margin-top: 1.8rem; font-family: var(--f-head); font-weight: 600; font-size: max(1.6rem, 14px); line-height: 2rem; letter-spacing: -.005em; }
.proj-card__more b { color: var(--orange); font-weight: 600; transition: transform .6s var(--ease-out); }
.proj-card:hover .proj-card__media { --cut: 4.4rem; }
.proj-card:hover .proj-card__media img { transform: scale(1.08); }
.proj-card:hover .proj-card__tags span { background: rgba(249, 112, 21, .85); border-color: transparent; }
.proj-card:hover .proj-card__title span { background-size: 100% 2px; }
.proj-card:hover .proj-card__more b { transform: translateX(.8rem); }

/* ---------- 03 Sectors we serve ---------- */
.pj-sectors { position: relative; padding: 14rem 0 15rem; overflow: hidden;
	background: radial-gradient(69.12rem 63.12rem at 146.88rem 84.16rem, rgba(110, 194, 227, .22), transparent),
		radial-gradient(60.48rem 63.12rem at 25.92rem 31.56rem, rgba(249, 112, 20, .2), transparent), #fff; }
.pj-sectors__head { display: flex; justify-content: space-between; align-items: flex-start; height: 9.8rem; } /* fixed so the longer right-hand text can't push the grid down */
.pj-sectors__head .eyebrow { margin-bottom: 1.2rem; }
.pj-sectors__title { width: 80rem; font-size: 6rem; line-height: 6.6rem; color: var(--text-strong); }
.pj-sectors__text { width: 52rem; margin-top: 4rem; color: var(--text-strong); opacity: .8; }
.pj-sectors__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.4rem; margin-top: 8rem; }

.sector { position: relative; display: block; height: 28rem; overflow: hidden; isolation: isolate; border: 1px solid rgba(0, 0, 0, .08); background: rgba(255, 255, 255, .75); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--text-strong); transition: border-color .6s; }
.sector__bg { position: absolute; inset: -1px; z-index: -1; clip-path: inset(100% 0 0 0); transition: clip-path .9s var(--ease-io); }
.sector__bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.2); transition: transform 1.4s var(--ease-out); }
.sector__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 20, 42, .3), rgba(6, 20, 42, .92)); }
.sector__n { position: absolute; left: 3.1rem; top: 3.1rem; font-family: var(--f-head); font-weight: 600; font-size: max(2.6rem, 19px); line-height: 3.2rem; letter-spacing: -.015em; color: var(--orange); }
.sector__arrow { position: absolute; right: 3.2rem; top: 2.7rem; width: 4.8rem; height: 4.8rem; transition: transform .6s var(--ease-out); }
.sector__arrow img { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .4s; }
.sector__arrow-on { opacity: 0; }
.sector__copy { position: absolute; left: 3.1rem; top: 15.7rem; width: 36.67rem; max-width: calc(100% - 6.2rem); }
.sector__title { font-size: max(2.6rem, 19px); line-height: 3.2rem; letter-spacing: -.015em; transition: color .5s; }
.sector__text { margin-top: 1rem; font-size: var(--t-body); line-height: 2.4rem; opacity: .75; transition: color .5s, opacity .5s; }
/* Active card (the first by default, then whichever is hovered): photo wipes up, text turns white */
.sector.is-active { border-color: transparent; }
.sector.is-active .sector__bg { clip-path: inset(0 0 0 0); }
.sector.is-active .sector__bg img { transform: scale(1); }
.sector.is-active .sector__title { color: #fff; }
.sector.is-active .sector__text { color: #fff; opacity: .85; }
.sector.is-active .sector__arrow-on { opacity: 1; }
.sector.is-active .sector__arrow-off { opacity: 0; }
.sector.is-active .sector__arrow { transform: rotate(45deg); }

/* ==========================================================================
   Mobile
   ========================================================================== */
@media (max-width: 1023px) {
	.tpl-projects .hero-box__copy { top: auto; }

	.pj-feature { grid-template-columns: minmax(0, 1fr); row-gap: 4rem; padding: 8rem 2rem; }
	.pj-feature__media { width: 100%; height: auto; aspect-ratio: 600 / 440; }
	.pj-feature__title { width: auto; font-size: clamp(34px, 8.6vw, 52px); line-height: 1.1; }
	.pj-feature__text { width: auto; }
	.pj-feature__stats { flex-direction: column; gap: 2rem; }
	.pj-feature__stat span { width: auto; }

	.pj-grid { padding: 8rem 0; }
	.pj-grid__head { flex-direction: column; gap: 2.4rem; }
	.pj-grid__title { width: auto; font-size: clamp(32px, 8.4vw, 48px); line-height: 1.1; }
	.pj-filter { justify-content: flex-start; margin-top: 0; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding-bottom: .4rem; scrollbar-width: none; }
	.pj-filter::-webkit-scrollbar { display: none; }
	.pj-grid__cards { grid-template-columns: 1fr 1fr; gap: 5.6rem 2rem; margin-top: 4.8rem; }
	.proj-card__media { height: auto; aspect-ratio: 425 / 380; }
	.proj-card__title { font-size: 20px; line-height: 1.3; }

	.pj-sectors { padding: 8rem 0; }
	.pj-sectors__head { flex-direction: column; height: auto; }
	.pj-sectors__title { width: auto; font-size: clamp(32px, 8.4vw, 48px); line-height: 1.1; }
	.pj-sectors__text { width: auto; margin-top: 2rem; }
	.pj-sectors__grid { grid-template-columns: 1fr 1fr; gap: 1.6rem; margin-top: 4.8rem; }
	.sector { height: auto; min-height: 26rem; }
	.sector__copy { position: relative; left: auto; top: auto; width: auto; max-width: none; padding: 13rem 2.4rem 2.4rem; }
	.sector__n { left: 2.4rem; top: 2.4rem; }
	.sector__arrow { right: 2.4rem; top: 2rem; }
}

@media (max-width: 640px) {
	.pj-grid__cards, .pj-sectors__grid { grid-template-columns: minmax(0, 1fr); }
}
