/* Final homepage polish layer. Keeps the desktop direction while tightening performance and mobile behavior. */

.wdm-live-frame {
	display: none !important;
}

.wdm-project-portal.is-live .wdm-portal-fallback,
.wdm-portal-fallback {
	opacity: 1 !important;
	visibility: visible !important;
}

.wdm-project-actions {
	display: grid;
	gap: 8px;
}

.wdm-project-actions .wdm-project-link + .wdm-project-link {
	color: var(--muted);
	border-top-color: var(--line-soft);
}

.wdm-work-more {
	width: min(100%, var(--max));
	margin: -20px auto 80px;
	padding: 0 var(--pad);
}

.wdm-work-more .wdm-line-link {
	max-width: 440px;
	margin-left: auto;
}

.wdm-site-shot {
	position: absolute;
	inset: 42px 0 0;
	overflow: hidden;
	background: #ece5da;
}

.wdm-site-shot img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	transition: transform 1.2s var(--ease);
}

.wdm-project-portal:hover .wdm-site-shot img {
	transform: scale(1.025);
}

#foundry .wdm-foundry-photo {
	transform-origin: center center;
	will-change: transform;
	animation: wdm-foundry-project-pan 10.5s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}

#foundry .wdm-foundry-word {
	will-change: transform;
	animation: wdm-foundry-project-type 7.5s ease-in-out infinite alternate;
}

#monolith .wdm-monolith-grid {
	will-change: background-position;
	animation: wdm-monolith-project-grid 15s linear infinite;
}

#monolith .wdm-monolith-shape {
	transform-origin: 55% 45%;
	will-change: transform;
	animation: wdm-monolith-project-shape 8.5s ease-in-out infinite alternate;
}

#monolith .wdm-monolith-copy {
	will-change: transform;
	animation: wdm-monolith-project-type 7s ease-in-out infinite alternate;
}

@keyframes wdm-foundry-project-pan {
	0% {
		transform: scale(1.035) translate3d(-1.2%, 0, 0);
	}
	50% {
		transform: scale(1.08) translate3d(0.8%, -0.8%, 0);
	}
	100% {
		transform: scale(1.12) translate3d(1.8%, -1.5%, 0);
	}
}

@keyframes wdm-foundry-project-type {
	0% {
		transform: translate3d(0, 0, 0);
	}
	100% {
		transform: translate3d(0, -5px, 0);
	}
}

@keyframes wdm-monolith-project-grid {
	from {
		background-position: 0 0, 0 0;
	}
	to {
		background-position: 64px 64px, 64px 64px;
	}
}

@keyframes wdm-monolith-project-shape {
	0% {
		transform: translate3d(-2%, 2%, 0) rotate(-1.2deg) scale(0.98);
	}
	100% {
		transform: translate3d(3%, -3%, 0) rotate(1.6deg) scale(1.035);
	}
}

@keyframes wdm-monolith-project-type {
	0% {
		transform: translate3d(0, 0, 0);
	}
	100% {
		transform: translate3d(4px, -6px, 0);
	}
}

.wdm-portal-fallback.wdm-lute-fallback {
	display: none;
}

.wdm-project-portal {
	contain: layout paint;
}

.wdm-hero-title span,
.wdm-project-copy h3,
.wdm-manifesto-copy,
.wdm-underhood-copy h2,
.wdm-about-copy h2,
.wdm-local > .wdm-section-inner > h2,
.wdm-final h2 {
	text-wrap: balance;
}

.wdm-hero-intro,
.wdm-project-description,
.wdm-underhood-copy p,
.wdm-about-copy > p,
.wdm-local-copy,
.wdm-final-bottom p {
	text-wrap: pretty;
}

@media (max-width: 1180px) {
	.wdm-project-chapter {
		min-height: auto;
		padding: 0 var(--pad) clamp(88px, 11vw, 140px);
	}

	.wdm-project-stage {
		position: relative;
		top: auto;
		height: auto;
		min-height: 0;
		grid-template-columns: minmax(280px, 0.42fr) minmax(0, 0.58fr);
		align-items: center;
		padding-top: 46px;
	}

	.wdm-project-copy h3 {
		font-size: clamp(54px, 7.1vw, 88px);
	}

	.wdm-project-description {
		margin-top: 28px;
	}
}

@media (max-width: 900px) {
	.wdm-scroll-rail,
	.wdm-cursor {
		display: none;
	}

	.wdm-hero {
		min-height: 100svh;
		padding-top: max(108px, calc(86px + env(safe-area-inset-top)));
		padding-bottom: 28px;
	}

	.wdm-hero-meta {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.wdm-hero-meta span:last-child {
		text-align: left;
	}

	.wdm-hero-title {
		margin-top: clamp(54px, 9vh, 90px);
		font-size: clamp(62px, 13.5vw, 112px);
		line-height: 0.76;
	}

	.wdm-hero-bottom {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.wdm-hero-intro {
		font-size: clamp(21px, 3.5vw, 29px);
		max-width: 28ch;
	}

	.wdm-hero-actions {
		width: min(100%, 440px);
	}

	.wdm-cap-strip {
		grid-template-columns: repeat(2, 1fr);
	}

	.wdm-cap-strip span {
		min-height: 54px;
		display: flex;
		align-items: center;
		border-bottom: 1px solid var(--line-soft);
	}

	.wdm-cap-strip span:nth-child(even) {
		border-right: 0;
	}

	.wdm-cap-strip span:last-child {
		grid-column: 1 / -1;
		border-bottom: 0;
	}

	.wdm-section {
		padding: clamp(82px, 13vw, 125px) var(--pad);
	}

	.wdm-section-head {
		grid-template-columns: 44px 1fr;
		gap: 10px;
	}

	.wdm-section-head > span:last-child {
		grid-column: 2;
		margin-top: 6px;
	}

	.wdm-manifesto-copy {
		font-size: clamp(52px, 11vw, 86px);
	}

	.wdm-manifesto-foot {
		grid-template-columns: 1fr;
		gap: 30px;
	}

	.wdm-work-intro h2 {
		font-size: clamp(58px, 13vw, 102px);
	}

	.wdm-project-chapter {
		padding-bottom: 100px;
	}

	.wdm-project-stage {
		grid-template-columns: 1fr;
		gap: 42px;
		padding-top: 36px;
	}

	.wdm-project-copy {
		max-width: 720px;
	}

	.wdm-project-copy h3 {
		font-size: clamp(56px, 11vw, 88px);
		max-width: 9ch;
	}

	.wdm-project-description {
		max-width: 58ch;
		font-size: 16px;
	}

	.wdm-project-actions {
		width: min(100%, 520px);
	}

	.wdm-project-portal {
		width: 100%;
		aspect-ratio: 16 / 10;
	}

	.wdm-work-more {
		margin-top: -34px;
		margin-bottom: 80px;
	}

	.wdm-work-more .wdm-line-link {
		margin-left: 0;
	}
}

@media (max-width: 600px) {
	:root {
		--pad: 18px;
	}

	.wdm-nav {
		height: 64px;
		padding-left: max(var(--pad), env(safe-area-inset-left));
		padding-right: max(var(--pad), env(safe-area-inset-right));
	}

	.wdm-menu {
		padding-top: env(safe-area-inset-top);
	}

	.wdm-menu > a {
		min-height: 80px;
		padding-left: var(--pad);
		padding-right: var(--pad);
	}

	.wdm-menu > a span {
		font-size: clamp(38px, 12vw, 53px);
	}

	.wdm-menu-foot {
		padding-left: var(--pad);
		padding-right: var(--pad);
		padding-bottom: max(24px, env(safe-area-inset-bottom));
	}

	.wdm-hero {
		min-height: 92svh;
		padding-top: max(96px, calc(76px + env(safe-area-inset-top)));
		padding-left: var(--pad);
		padding-right: var(--pad);
	}

	.wdm-hero-meta {
		font-size: 7px;
		line-height: 1.5;
	}

	.wdm-hero-title {
		margin-top: 45px;
		font-size: clamp(48px, 14.7vw, 68px);
		line-height: 0.79;
		letter-spacing: -0.074em;
	}

	.wdm-hero-bottom {
		margin-top: auto;
		padding-top: 54px;
	}

	.wdm-hero-intro {
		font-size: 20px;
		line-height: 1.12;
	}

	.wdm-line-link,
	.wdm-project-link,
	.wdm-cta-link {
		min-height: 48px;
		padding: 13px 0;
		font-size: 9px;
	}

	.wdm-cap-strip span {
		padding: 14px var(--pad);
		font-size: 7px;
	}

	.wdm-section {
		padding: 78px var(--pad);
	}

	.wdm-section-head {
		font-size: 7px;
		padding-bottom: 13px;
	}

	.wdm-manifesto-copy {
		margin-top: 48px;
		font-size: clamp(45px, 13vw, 59px);
		line-height: 0.91;
	}

	.wdm-manifesto-foot {
		margin-top: 58px;
	}

	.wdm-manifesto-foot p {
		font-size: 17px;
		line-height: 1.42;
	}

	.wdm-work {
		padding-top: 76px;
	}

	.wdm-work-intro {
		margin-bottom: 34px;
	}

	.wdm-work-intro h2 {
		margin-top: 28px;
		font-size: clamp(49px, 14vw, 66px);
		line-height: 0.86;
	}

	.wdm-project-chapter {
		padding-bottom: 86px;
	}

	.wdm-project-stage {
		padding-top: 30px;
		gap: 30px;
	}

	.wdm-project-index,
	.wdm-project-type {
		font-size: 7px;
	}

	.wdm-project-copy h3 {
		margin: 26px 0 16px;
		font-size: clamp(45px, 13vw, 61px);
		line-height: 0.86;
	}

	.wdm-project-description {
		margin: 24px 0 22px;
		font-size: 14px;
		line-height: 1.55;
	}

	.wdm-project-tags {
		margin-bottom: 22px;
	}

	.wdm-project-tags span {
		font-size: 7px;
	}

	.wdm-project-portal {
		aspect-ratio: 4 / 3;
		box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
	}

	.wdm-portal-topbar {
		height: 36px;
		padding: 0 10px;
		font-size: 6px;
	}

	.wdm-site-shot,
	.wdm-portal-fallback,
	.wdm-portal-overlay-link {
		inset-top: 36px;
	}

	.wdm-site-shot {
		inset: 36px 0 0;
	}

	.wdm-portal-fallback {
		inset: 36px 0 0;
	}

	.wdm-portal-overlay-link {
		inset: 36px 0 0;
	}

	.wdm-foundry-word,
	.wdm-monolith-copy {
		font-size: clamp(35px, 10.5vw, 48px) !important;
	}

	#foundry .wdm-foundry-photo {
		animation-duration: 8.5s;
	}

	#monolith .wdm-monolith-grid {
		animation-duration: 11s;
	}

	#monolith .wdm-monolith-shape {
		animation-duration: 7s;
	}

	.wdm-underhood-grid,
	.wdm-about-grid,
	.wdm-local-grid,
	.wdm-final-bottom {
		grid-template-columns: 1fr !important;
	}

	.wdm-underhood-copy h2,
	.wdm-about-copy h2,
	.wdm-local > .wdm-section-inner > h2,
	.wdm-final h2 {
		font-size: clamp(45px, 13vw, 61px) !important;
		line-height: 0.9 !important;
	}

	.wdm-stack-row,
	.wdm-service-row,
	.wdm-learning-row {
		grid-template-columns: 32px 1fr !important;
		gap: 10px !important;
	}

	.wdm-stack-row p,
	.wdm-service-row p,
	.wdm-learning-row > span:last-child {
		grid-column: 2 !important;
		margin-top: 4px !important;
	}

	.wdm-about-photo {
		max-height: 520px;
		overflow: hidden;
	}

	.wdm-about-photo img {
		height: 100%;
		object-fit: cover;
		object-position: 58% center;
	}

	.wdm-location-links a {
		min-height: 54px;
	}

	.wdm-final {
		padding: 84px var(--pad) max(60px, env(safe-area-inset-bottom));
	}

	.wdm-footer-inner {
		grid-template-columns: 1fr !important;
		gap: 18px !important;
	}
}

@media (max-width: 390px) {
	.wdm-hero-title {
		font-size: clamp(45px, 14.3vw, 56px);
	}

	.wdm-hero-intro {
		font-size: 18px;
	}

	.wdm-project-copy h3,
	.wdm-manifesto-copy,
	.wdm-underhood-copy h2,
	.wdm-about-copy h2,
	.wdm-local > .wdm-section-inner > h2,
	.wdm-final h2 {
		font-size: 44px !important;
	}

	.wdm-project-description {
		font-size: 13px;
	}
}

@media (max-width: 340px) {
	:root {
		--pad: 15px;
	}

	.wdm-hero-title {
		font-size: 42px;
	}

	.wdm-menu > a span {
		font-size: 34px;
	}

	.wdm-project-copy h3,
	.wdm-manifesto-copy,
	.wdm-underhood-copy h2,
	.wdm-about-copy h2,
	.wdm-local > .wdm-section-inner > h2,
	.wdm-final h2 {
		font-size: 40px !important;
	}
}

@media (max-height: 560px) and (orientation: landscape) {
	.wdm-hero {
		min-height: 680px;
	}

	.wdm-menu {
		overflow-y: auto;
	}

	.wdm-menu > a {
		min-height: 58px;
	}

	.wdm-menu-foot {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wdm-project-portal:hover .wdm-site-shot img,
	#foundry .wdm-foundry-photo,
	#foundry .wdm-foundry-word,
	#monolith .wdm-monolith-grid,
	#monolith .wdm-monolith-shape,
	#monolith .wdm-monolith-copy {
		animation: none !important;
		transform: none !important;
	}
}
