/* ==========================================================================
   Projects: homepage section, cards, archive grid, single project
   ========================================================================== */

/* Homepage section ------------------------------------------------------- */

.home-projects {
	padding-block: var(--section-space);
}

.home-projects__eyebrow {
	margin-bottom: 22px;
}

.home-projects__title {
	font-size: clamp(64px, 17vw, 120px);
	line-height: 0.95;
}

.home-projects__title .dw-thin {
	font-weight: 250;
}

.home-projects__intro-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px 40px;
	margin-top: 22px;
}

.home-projects__all-desktop {
	display: none;
}

.home-projects__list {
	display: flex;
	flex-direction: column;
	margin-top: 40px;
}

.home-projects__all-mobile {
	display: flex;
	justify-content: center;
	margin-top: 36px;
}

.home-projects__all-mobile .dw-btn {
	min-width: min(100%, 300px);
	min-height: 60px;
	gap: 34px;
	font-size: 16px;
	letter-spacing: 0.16em;
}

/* Card: base (mobile compact row) ---------------------------------------- */

.project-card {
	--fg: var(--color-cream);
	--fg-soft: var(--color-cream-soft);
	--fg-faint: var(--color-cream-faint);
	position: relative;
	color: var(--fg);
}

.project-card__link {
	display: grid;
	grid-template-columns: 28px minmax(88px, 31%) minmax(0, 1fr) 26px;
	align-items: center;
	gap: 14px;
	padding: 18px 0;
	border-top: 1px solid var(--fg-faint);
	color: inherit;
	text-decoration: none;
}

.project-card:last-child .project-card__link {
	border-bottom: 1px solid var(--fg-faint);
}

.project-card__index {
	align-self: start;
	padding-top: 6px;
	font-size: 15px;
	letter-spacing: 0.18em;
	font-variant-numeric: tabular-nums;
}

.project-card__total {
	opacity: 0.85;
}

.project-card__media {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 1.6;
	border-radius: 6px;
	background: var(--color-night-2);
}

.project-card__media img,
.project-card__media .dw-placeholder {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 1.2s var(--ease-out);
}

.project-card__media .dw-placeholder__mark {
	font-size: clamp(40px, 8vw, 120px);
}

.project-card__link:hover .project-card__media img {
	transform: scale(1.04);
}

.project-card__body {
	min-width: 0;
}

.project-card__title {
	font-family: var(--font-ui);
	font-weight: 500;
	font-size: 14px;
	line-height: 1.35;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.project-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin-top: 8px;
	font-size: 10.5px;
	line-height: 1.7;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--fg-soft);
}

.project-card__meta .dw-sep {
	width: 12px;
	margin-inline: 0.6em;
}

.project-card__summary {
	margin-top: 12px;
	font-size: 15px;
	line-height: 1.6;
	letter-spacing: 0.04em;
	color: var(--fg-soft);
}

.project-card__arrow {
	align-self: start;
	justify-self: end;
	padding-top: 4px;
}

.project-card__arrow .dw-icon {
	width: 28px;
	height: 28px;
	stroke-width: 1.1;
	transition: transform var(--dur) var(--ease-out);
}

.project-card__link:hover .project-card__arrow .dw-icon {
	transform: translate(3px, -3px);
}

/* Card: mobile featured (big image, text over it) ------------------------ */

.project-card--featured .project-card__link {
	display: block;
	position: relative;
	padding: 0;
	margin-bottom: 26px;
	border: 1px solid rgba(247, 239, 229, 0.3);
	border-radius: var(--radius-md);
	overflow: hidden;
}

.project-card--featured .project-card__media {
	aspect-ratio: 1.08;
	border-radius: 0;
}

.project-card--featured .project-card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(8, 7, 18, 0.45) 0%, rgba(8, 7, 18, 0) 22%),
		linear-gradient(180deg, rgba(8, 7, 18, 0) 34%, rgba(8, 7, 18, 0.7) 62%, rgba(8, 7, 18, 0.92) 100%);
	pointer-events: none;
}

.project-card--featured .project-card__index {
	position: absolute;
	top: 22px;
	right: 24px;
	z-index: 2;
	padding: 0;
	font-size: 14px;
	letter-spacing: 0.22em;
}

.project-card--featured .project-card__body {
	position: absolute;
	left: 24px;
	right: 72px;
	bottom: 22px;
	z-index: 2;
}

.project-card--featured .project-card__title {
	font-size: clamp(17px, 4.8vw, 26px);
	letter-spacing: 0.18em;
}

.project-card--featured .project-card__meta {
	font-size: 12px;
	letter-spacing: 0.3em;
	color: var(--fg);
}

.project-card--featured .project-card__arrow {
	position: absolute;
	right: 20px;
	bottom: 22px;
	z-index: 2;
}

.project-card--featured .project-card__arrow .dw-icon {
	width: 32px;
	height: 32px;
}

.project-card--featured + .project-card .project-card__link {
	border-top: 1px solid var(--fg-faint);
}

/* Desktop: three cards along the bottom of the section ------------------- */

@media (min-width: 900px) {
	/* A soft ground shadow so the card captions read over the sunlit rocks. */
	.home-projects::before {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		height: 58%;
		z-index: -1;
		pointer-events: none;
		background: linear-gradient(180deg, rgba(16, 9, 24, 0) 0%, rgba(16, 9, 24, 0.42) 42%, rgba(16, 9, 24, 0.58) 74%, rgba(16, 9, 24, 0) 100%);
	}

	.home-projects {
		display: flex;
		flex-direction: column;
		min-height: var(--vh-full);
		padding-block: calc(var(--header-h) + 4vh) clamp(40px, 6vh, 72px);
	}

	.home-projects__inner {
		display: flex;
		flex-direction: column;
		flex: 1;
	}

	.home-projects__eyebrow {
		margin-bottom: clamp(14px, 2.4vh, 26px);
	}

	.home-projects__title {
		font-size: min(8.8vw, 13vh, 172px);
		line-height: 0.9;
		letter-spacing: -0.05em;
	}

	.home-projects__intro-row {
		margin-top: clamp(14px, 2.6vh, 30px);
	}

	.home-projects__intro {
		max-width: 31em;
	}

	.home-projects__all-desktop {
		display: inline-flex;
	}

	.home-projects__list {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: clamp(20px, 2.4vw, 40px);
		margin-top: auto;
		padding-top: clamp(40px, 8vh, 96px);
	}

	.home-projects__all-mobile {
		display: none;
	}

	.project-card--home .project-card__link,
	.project-card--home.project-card--featured .project-card__link {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-rows: auto auto;
		gap: 18px 16px;
		align-items: start;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 0;
		overflow: visible;
	}

	.project-card--home:last-child .project-card__link {
		border: 0;
	}

	.project-card--home .project-card__index {
		display: none;
	}

	.project-card--home .project-card__media,
	.project-card--home.project-card--featured .project-card__media {
		grid-column: 1 / -1;
		aspect-ratio: 16 / 9;
		border: 1px solid rgba(255, 245, 235, 0.42);
		border-radius: var(--radius-sm);
	}

	.project-card--home.project-card--featured .project-card__media::after {
		display: none;
	}

	.project-card--home .project-card__body,
	.project-card--home.project-card--featured .project-card__body {
		position: static;
		padding-left: 4px;
	}

	.project-card--home .project-card__title,
	.project-card--home.project-card--featured .project-card__title {
		font-family: var(--font-display-light);
		font-weight: 300;
		font-size: clamp(22px, 1.75vw, 30px);
		letter-spacing: -0.01em;
		text-transform: lowercase;
	}

	.project-card--home .project-card__meta,
	.project-card--home.project-card--featured .project-card__meta {
		margin-top: 6px;
		font-size: clamp(12px, 0.95vw, 15px);
		letter-spacing: 0.06em;
		text-transform: lowercase;
		color: var(--fg-soft);
	}

	.project-card--home .project-card__arrow,
	.project-card--home.project-card--featured .project-card__arrow {
		position: static;
		display: grid;
		place-items: center;
		width: 44px;
		height: 44px;
		padding: 0;
		margin-top: 2px;
		border: 1px solid var(--fg);
		border-radius: 50%;
	}

	.project-card--home .project-card__arrow .dw-icon,
	.project-card--home.project-card--featured .project-card__arrow .dw-icon {
		width: 20px;
		height: 20px;
	}
}

/* Archive grid ------------------------------------------------------------ */

.dw-page--projects .page-head {
	margin-bottom: clamp(32px, 6vh, 64px);
}

.project-grid {
	display: flex;
	flex-direction: column;
}

/* Service pages, phones and tablets: related projects keep the image-left /
   text-right row, but the description moves under the whole row (phones) so it
   is never squeezed into a narrow column. The card body dissolves into the row's
   grid so title, labels, arrow and description can each take their own area. */
@media (max-width: 899px) {
	.project-grid--service .project-card__link {
		grid-template-columns: minmax(120px, 40%) minmax(0, 1fr);
		grid-template-rows: auto auto 1fr auto;
		grid-template-areas:
			"media title"
			"media meta"
			"media arrow"
			"desc desc";
		align-items: start;
		gap: 0 20px;
		padding: 26px 0;
	}

	.project-grid--service .project-card__index {
		display: none;
	}

	.project-grid--service .project-card__body {
		display: contents;
	}

	.project-grid--service .project-card__media {
		grid-area: media;
		aspect-ratio: 4 / 3;
	}

	.project-grid--service .project-card__title {
		grid-area: title;
	}

	.project-grid--service .project-card__meta {
		grid-area: meta;
	}

	.project-grid--service .project-card__arrow {
		grid-area: arrow;
		align-self: end;
		justify-self: start;
		padding-top: 12px;
	}

	.project-grid--service .project-card__summary {
		grid-area: desc;
		margin-top: 20px;
	}
}

/* Tablets have room for the description beside the image. */
@media (min-width: 720px) and (max-width: 899px) {
	.project-grid--service .project-card__link {
		grid-template-columns: minmax(220px, 40%) minmax(0, 1fr);
		grid-template-rows: auto auto auto 1fr;
		grid-template-areas:
			"media title"
			"media meta"
			"media desc"
			"media arrow";
		column-gap: 28px;
	}

	.project-grid--service .project-card__summary {
		margin-top: 14px;
	}
}

@media (min-width: 900px) {
	.project-grid {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: clamp(48px, 7vh, 88px) clamp(24px, 3vw, 48px);
	}

	.project-card--archive .project-card__link,
	.project-card--archive.project-card--featured .project-card__link {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 22px 16px;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 0;
		overflow: visible;
	}

	.project-card--archive:last-child .project-card__link {
		border: 0;
	}

	.project-card--archive .project-card__index {
		display: none;
	}

	/* Website screenshots are wide; 16:9 shows them nearly whole. */
	.project-card--archive .project-card__media {
		grid-column: 1 / -1;
		aspect-ratio: 16 / 9;
		border: 1px solid rgba(255, 245, 235, 0.3);
		border-radius: var(--radius-sm);
	}

	.project-card--archive .project-card__body,
	.project-card--archive.project-card--featured .project-card__body {
		position: static;
	}

	.project-card--archive .project-card__title,
	.project-card--archive.project-card--featured .project-card__title {
		font-family: var(--font-display-light);
		font-weight: 300;
		font-size: clamp(28px, 2.4vw, 42px);
		letter-spacing: -0.015em;
		text-transform: lowercase;
	}

	.project-card--archive .project-card__meta,
	.project-card--archive.project-card--featured .project-card__meta {
		font-size: 13px;
		letter-spacing: 0.08em;
		text-transform: lowercase;
		color: var(--fg-soft);
	}

	.project-card--archive .project-card__summary {
		max-width: 36em;
	}

	.project-card--archive .project-card__arrow,
	.project-card--archive.project-card--featured .project-card__arrow {
		position: static;
		display: grid;
		place-items: center;
		width: 52px;
		height: 52px;
		border: 1px solid var(--fg);
		border-radius: 50%;
		padding: 0;
	}

	.project-card--archive .project-card__arrow .dw-icon {
		width: 22px;
		height: 22px;
	}
}

/* Every project gets the same card: three across once there is room. */
@media (min-width: 1100px) {
	.project-grid:not(.project-grid--service) {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Single project ---------------------------------------------------------- */

.dw-project {
	padding-top: calc(var(--header-h) + clamp(48px, 12vh, 140px));
}

.dw-project__head .dw-eyebrow {
	margin-bottom: 26px;
}

.dw-project__title {
	font-size: clamp(48px, 10vw, 150px);
	line-height: 0.96;
	text-transform: lowercase;
}

.dw-project__intro {
	display: grid;
	gap: 28px;
	margin-top: clamp(24px, 4vh, 40px);
}

.dw-project__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 18px 48px;
}

.dw-project__facts dt {
	font-size: 11.5px;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--fg-soft);
}

.dw-project__facts dd {
	margin-top: 6px;
	font-size: 16px;
	letter-spacing: 0.06em;
	text-transform: lowercase;
}

.dw-project__facts dd a {
	text-decoration: none;
	border-bottom: 1px solid var(--fg-faint);
	transition: border-color var(--dur-fast);
}

.dw-project__facts dd a:hover {
	border-color: var(--fg);
}

.dw-project__visit {
	justify-self: start;
}

/* Project note: a short aside under the facts, e.g. when the live site has changed since. */
.dw-project__note {
	max-width: 680px;
	padding: 18px 22px 20px;
	border: 1px solid var(--fg-faint);
	border-left: 3px solid var(--color-peach);
	border-radius: var(--radius-sm);
	background: rgba(247, 239, 229, 0.04);
}

.dw-project__note p {
	margin: 10px 0 0;
	font-size: 15.5px;
	line-height: 1.6;
	color: rgba(247, 239, 229, 0.9);
}

.dw-project__note .dw-project__note-label {
	margin: 0;
	font-size: 11.5px;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--fg-soft);
}

.dw-project__hero {
	margin-top: clamp(40px, 8vh, 88px);
}

/* The main image and the gallery show at about the size the files were made for,
   not stretched across the whole screen. */
.dw-project__hero.dw-container,
.dw-gallery-grid.dw-container {
	max-width: calc(900px + 2 * var(--page-gutter));
}

/* Case study: the challenge / the approach / the outcome. */
.dw-case {
	display: grid;
	gap: clamp(48px, 8vh, 88px);
	margin-top: clamp(64px, 10vh, 120px);
}

.dw-case__section {
	display: grid;
	gap: 18px;
	padding-top: clamp(28px, 4vh, 40px);
	border-top: 1px solid var(--fg-faint);
}

.dw-case__title {
	font-size: clamp(36px, 5vw, 72px);
	line-height: 1;
}

.dw-case__body {
	display: grid;
	gap: 1.1em;
	max-width: 38em;
	font-size: clamp(17px, 1.1vw + 10px, 20px);
	line-height: 1.75;
	letter-spacing: 0.01em;
	color: rgba(247, 239, 229, 0.9);
}

@media (min-width: 900px) {
	.dw-case__section {
		grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
		column-gap: 6vw;
		align-items: start;
	}
}

/* Services on this project, linking to each service page. */
.dw-project__services {
	margin-top: clamp(72px, 12vh, 140px);
}

.dw-project__services .dw-eyebrow {
	margin-bottom: 22px;
}

.dw-project__service-list li {
	border-top: 1px solid var(--fg-faint);
}

.dw-project__service-list li:last-child {
	border-bottom: 1px solid var(--fg-faint);
}

.dw-project__service {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 8px 24px;
	padding: clamp(20px, 3.4vh, 32px) 0;
	text-decoration: none;
}

.dw-project__service-name {
	font-size: clamp(32px, 4.4vw, 64px);
	line-height: 1.04;
}

.dw-project__service-desc {
	grid-column: 1;
	max-width: 40em;
	font-size: 15px;
	line-height: 1.6;
	letter-spacing: 0.04em;
	color: var(--fg-soft);
}

.dw-project__service .dw-circle {
	grid-column: 2;
	grid-row: 1 / span 2;
}

.dw-project__service:hover .dw-circle {
	border-color: var(--fg);
	background: rgba(247, 239, 229, 0.08);
}

.dw-project__hero img {
	width: 100%;
	border-radius: var(--radius-sm);
	border: 1px solid rgba(255, 245, 235, 0.22);
}

.dw-gallery-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(16px, 2vw, 28px);
	margin-top: clamp(48px, 8vh, 96px);
}

.dw-gallery-grid img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: var(--radius-sm);
}

@media (min-width: 900px) {
	.dw-project__intro {
		grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
		align-items: end;
		column-gap: 6vw;
	}

	.dw-project__visit {
		grid-column: 2;
	}

	.dw-project__note {
		grid-column: 1 / -1;
	}

	.dw-gallery-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.dw-gallery-grid__item.is-wide {
		grid-column: 1 / -1;
	}
}

.dw-project__next {
	margin-top: clamp(80px, 16vh, 180px);
}

.dw-project__next a {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: end;
	gap: 8px 24px;
	padding-top: 34px;
	border-top: 1px solid var(--fg-faint);
	text-decoration: none;
}

.dw-project__next-label {
	grid-column: 1 / -1;
	font-size: 12px;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--fg-soft);
}

.dw-project__next-title {
	font-size: clamp(40px, 7vw, 110px);
	line-height: 1;
	text-transform: lowercase;
}

.dw-project__next .dw-circle {
	width: 64px;
	height: 64px;
	margin-bottom: 10px;
}

.dw-project__next a:hover .dw-circle {
	border-color: var(--fg);
	background: rgba(247, 239, 229, 0.08);
}

/* Print showcase ----------------------------------------------------------
   Project galleries given one of the theme's block styles (Fanned stack, On a
   tee, Flip cards, Phone carousel) are rebuilt by showcase.js as printed pieces
   and marked .is-dw-ready. Without the script they stay ordinary galleries.
   Sets sit in a Group with the class "dw-show" (a heading, then the gallery);
   "dw-stages" lines up Groups with the class "dw-stage" side by side. */

/* journal.css (loaded later) sets the prose width; the showcase needs the page's. */
.dw-prose.dw-project__overview--showcase {
	max-width: var(--container);
}

.dw-project__overview--showcase > :is(p, h2, h4, ul, ol, blockquote) {
	max-width: 760px;
	margin-inline: auto;
}

.dw-show,
.dw-stages {
	--paper-shadow: 0 1px 1px rgba(0, 0, 0, 0.25), 0 10px 22px rgba(0, 0, 0, 0.32), 0 34px 70px rgba(0, 0, 0, 0.42);
}

.dw-prose > .dw-show,
.dw-prose > .dw-stages {
	margin-top: clamp(72px, 12vh, 140px);
}

/* Classic themes keep the Group's inner wrapper; let its children lay out directly. */
.dw-show > .wp-block-group__inner-container,
.dw-stages > .wp-block-group__inner-container,
.dw-stage > .wp-block-group__inner-container {
	display: contents;
}

.dw-prose .dw-show h3,
.dw-prose .dw-stage h3 {
	margin: 0;
	font-family: var(--font-display-light);
	font-weight: 200;
	font-size: clamp(30px, 3.4vw, 46px);
	line-height: 1.05;
	letter-spacing: -0.03em;
	text-transform: lowercase;
}

.dw-prose .dw-stage h3 {
	font-size: clamp(26px, 2.2vw, 32px);
	text-align: center;
}

.dw-prose .wp-block-gallery.is-dw-ready {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin: 10px 0 0;
}

/* The caption names the client: a small label under the set's heading. */
.dw-prose .wp-block-gallery.is-dw-ready > figcaption {
	order: -1;
	flex: none;
	margin: 0;
	padding: 0;
	font-size: 11.5px;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	text-align: left;
	color: var(--fg-soft);
}

.dw-stage .wp-block-gallery.is-dw-ready > figcaption {
	order: 0;
	margin-top: 18px;
	text-align: center;
}

/* Fanned stack */

.dw-fan__wrap {
	display: grid;
	gap: 18px;
}

.dw-fan {
	position: relative;
	display: grid;
	place-items: center;
	min-height: var(--fan-h, 520px);
	margin-top: clamp(12px, 3vh, 32px);
	background: radial-gradient(60% 55% at 50% 45%, rgba(125, 92, 208, 0.16), rgba(125, 92, 208, 0) 70%);
}

.dw-fan__card {
	grid-area: 1 / 1;
	position: relative;
	display: block;
	padding: 0;
	border: 0;
	border-radius: 3px;
	overflow: hidden;
	background: #fff;
	cursor: zoom-in;
	box-shadow: var(--paper-shadow);
	transform: translate(var(--x0, 0), var(--y0, 0)) rotate(var(--r0, 0deg));
	transition:
		transform var(--dur-slow) var(--ease-out) calc(var(--i, 0) * 45ms),
		box-shadow var(--dur) var(--ease-out);
}

.dw-fan__card::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(118deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 38%, rgba(0, 0, 0, 0) 64%, rgba(0, 0, 0, 0.12));
	pointer-events: none;
}

.dw-prose .dw-fan__card img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 0;
}

.dw-fan.is-open .dw-fan__card {
	transform: translate(var(--x), var(--y)) rotate(var(--r));
}

.dw-fan.is-open .dw-fan__card:is(:hover, :focus-visible) {
	transform: translate(var(--x), calc(var(--y) - 22px)) rotate(var(--r));
	box-shadow: 0 2px 2px rgba(0, 0, 0, 0.25), 0 22px 40px rgba(0, 0, 0, 0.4), 0 50px 90px rgba(0, 0, 0, 0.45);
	transition-delay: 0s;
}

.dw-fan__card:focus-visible {
	outline: 2px solid var(--color-peach);
	outline-offset: 4px;
}

.dw-fan__bar {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 22px;
	font-size: 11.5px;
	letter-spacing: 0.26em;
	text-transform: uppercase;
	color: var(--fg-soft);
}

.dw-fan__bar[hidden] {
	display: none;
}

.dw-fan__zoom {
	padding: 6px 0;
	border: 0;
	border-bottom: 1px solid var(--fg-faint);
	background: none;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	cursor: pointer;
}

/* Phones: a deck. Tap or swipe sends the top piece to the back. */
.dw-fan.is-deck {
	touch-action: pan-y;
}

.dw-fan.is-deck .dw-fan__card,
.dw-fan.is-deck.is-open .dw-fan__card {
	cursor: pointer;
	transform: translate(calc(var(--d, 0) * 5px), calc(var(--d, 0) * -5px)) rotate(calc(var(--d, 0) * 2.2deg - 1.5deg));
	transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out);
}

.dw-fan.is-deck .dw-fan__card.is-leaving {
	transform: translateX(115%) rotate(14deg);
	opacity: 0;
}

.dw-fan.is-deck .dw-fan__card.is-returning {
	transition: none;
}

/* Stages: tee, flip cards, phone */

.dw-stages {
	display: grid;
	gap: clamp(20px, 2vw, 28px);
}

.dw-stage {
	display: grid;
	justify-items: center;
	align-content: start;
	gap: 22px;
	padding: 32px 20px 28px;
	border: 1px solid rgba(247, 239, 229, 0.08);
	border-radius: var(--radius-sm);
	background: radial-gradient(90% 70% at 50% 30%, rgba(247, 239, 229, 0.07), rgba(247, 239, 229, 0.015) 70%);
}

.dw-stage .wp-block-gallery.is-dw-ready {
	align-items: center;
	width: 100%;
}

.dw-prose .dw-stages > * + *,
.dw-prose .dw-stages > .wp-block-group__inner-container > * + * {
	margin-top: 0;
}

.dw-tee {
	display: grid;
	justify-items: center;
	gap: 18px;
	width: min(100%, 360px);
}

.dw-tee__shirt {
	display: block;
	width: 100%;
	height: auto;
	filter: drop-shadow(0 28px 36px rgba(0, 0, 0, 0.55));
}

.dw-tee__art {
	mix-blend-mode: screen;
}

.dw-tee__fold {
	filter: blur(10px);
}

.dw-tee__swatches {
	display: flex;
	gap: 10px;
}

.dw-tee__swatch {
	width: 50px;
	height: 50px;
	padding: 0;
	border: 1px solid rgba(247, 239, 229, 0.25);
	border-radius: 50%;
	background: #000 center / 150% no-repeat;
	cursor: pointer;
	transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}

.dw-tee__swatch[aria-pressed="true"] {
	border-color: var(--color-peach);
	box-shadow: 0 0 0 3px rgba(251, 179, 106, 0.25);
}

.dw-flips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 40px;
	padding: 14px 0 6px;
}

.dw-flip {
	position: relative;
	display: block;
	max-width: 100%;
	padding: 0;
	border: 0;
	background: none;
	perspective: 1100px;
	cursor: pointer;
}

.dw-flip__pile {
	position: absolute;
	inset: 0;
	border-radius: 5px;
	background: #1b1b1b center / cover;
	box-shadow: var(--paper-shadow);
	filter: brightness(0.55);
	transform: rotate(-8deg) translate(-14px, 10px);
}

.dw-flip__pile + .dw-flip__pile {
	transform: rotate(5deg) translate(12px, 6px);
}

.dw-flip__inner {
	position: absolute;
	inset: 0;
	transform-style: preserve-3d;
	transition: transform var(--dur-slow) var(--ease-out);
}

.dw-flip__face {
	position: absolute;
	inset: 0;
	overflow: hidden;
	border-radius: 5px;
	backface-visibility: hidden;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 18px 36px rgba(0, 0, 0, 0.4);
}

.dw-prose .dw-flip__face img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
}

.dw-flip__face--back {
	transform: rotateY(180deg);
}

.dw-flip[aria-pressed="true"] .dw-flip__inner,
.dw-flip.flips-on-hover:hover .dw-flip__inner {
	transform: rotateY(180deg);
}

.dw-flip.flips-on-hover[aria-pressed="true"]:hover .dw-flip__inner {
	transform: rotateY(0deg);
}

.dw-flip:focus-visible {
	outline: 2px solid var(--color-peach);
	outline-offset: 8px;
}

.dw-phone {
	width: min(100%, 264px);
	padding: 10px;
	border-radius: 42px;
	background: linear-gradient(160deg, #2a2a33, #0c0c11);
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.dw-phone__screen {
	overflow: hidden;
	border-radius: 33px;
	background: #fff;
	color: #111;
}

.dw-phone__head {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 28px 14px 9px;
	font: 600 12px/1.2 var(--font-ui);
	letter-spacing: 0.01em;
}

.dw-phone__avatar {
	display: grid;
	place-items: center;
	flex: none;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--dusk-gradient-solid);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
}

.dw-phone__name {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.dw-phone__count {
	margin-left: auto;
	font-weight: 400;
	color: #777;
	font-variant-numeric: tabular-nums;
}

.dw-phone__slides {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}

.dw-phone__slides::-webkit-scrollbar {
	display: none;
}

.dw-phone__slides:focus-visible {
	outline: 2px solid var(--color-peach);
	outline-offset: -2px;
}

.dw-phone__slide {
	flex: 0 0 100%;
	scroll-snap-align: start;
}

.dw-prose .dw-phone__slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
}

.dw-phone__dots {
	display: flex;
	justify-content: center;
	gap: 4px;
	padding: 10px 0 22px;
}

.dw-phone__dots span {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: #cfcfcf;
	transition: background var(--dur-fast);
}

.dw-phone__dots span.is-on {
	background: #3b82f6;
}

/* Full-size viewer */

.dw-viewer {
	width: 100vw;
	max-width: none;
	height: 100dvh;
	max-height: none;
	margin: 0;
	padding: 64px 16px 56px;
	border: 0;
	background: rgba(6, 7, 16, 0.95);
	color: var(--color-cream);
}

.dw-viewer[open] {
	display: grid;
	place-items: center;
}

.dw-viewer::backdrop {
	background: rgba(6, 7, 16, 0.6);
}

.dw-viewer__figure {
	display: grid;
	justify-items: center;
	gap: 14px;
	margin: 0;
}

.dw-viewer__img {
	display: block;
	max-width: min(100%, 1200px);
	max-height: calc(100dvh - 150px);
	width: auto;
	height: auto;
	box-shadow: 0 34px 70px rgba(0, 0, 0, 0.5);
}

.dw-viewer__count {
	font-size: 11.5px;
	letter-spacing: 0.3em;
	color: var(--color-cream-soft);
}

.dw-viewer__btn {
	position: absolute;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid rgba(247, 239, 229, 0.35);
	border-radius: 50%;
	background: rgba(6, 7, 16, 0.5);
	color: var(--color-cream);
	cursor: pointer;
	transition: border-color var(--dur-fast), background-color var(--dur-fast);
}

.dw-viewer__btn:hover,
.dw-viewer__btn:focus-visible {
	border-color: var(--color-cream);
	background: rgba(247, 239, 229, 0.1);
}

.dw-viewer__btn svg {
	width: 22px;
	height: 22px;
}

.dw-viewer__btn[hidden] {
	display: none;
}

.dw-viewer__prev {
	left: 18px;
	top: 50%;
	transform: translateY(-50%);
}

.dw-viewer__next {
	right: 18px;
	top: 50%;
	transform: translateY(-50%);
}

.dw-viewer__close {
	top: 14px;
	right: 18px;
}

.dw-viewer-open {
	overflow: hidden;
}

@media (max-width: 699px) {
	.dw-viewer__prev,
	.dw-viewer__next {
		top: auto;
		bottom: 10px;
		transform: none;
	}

	.dw-viewer__prev {
		left: calc(50% - 64px);
	}

	.dw-viewer__next {
		right: calc(50% - 64px);
	}

	.dw-viewer__count {
		display: none;
	}
}

@media (min-width: 700px) {
	.dw-stages {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1200px) {
	.dw-stages {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* A set with a single stage (one phone, one card or one tee) sits centered. */
.dw-stages:not(:has(.dw-stage ~ .dw-stage)) {
	grid-template-columns: minmax(0, 520px);
	justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
	.dw-fan__card,
	.dw-flip__inner {
		transition: none;
	}
}
