/* Crew story: landing, Maher + Jeremy, MA + MY, logo drawn with brush, pencil and ruler (Maher 12.11.2026). */
.mamy-crew {
	--crew-ink: #1a1220;
	--crew-paper: #fff7eb;
	--crew-pink: #ec6da6;
	--crew-turq: #36babe;
	--crew-header: calc(var(--header-height, 72px) + var(--wp-admin--admin-bar--height, 0px));
	--crew-screen: 100svh;
	position: relative;
	z-index: 6;
	display: grid;
	color: var(--crew-paper);
	background: #1b1030;
}

.mamy-crew-stage,
.mamy-crew-copy { grid-area: 1 / 1; min-width: 0; }

/* ---- static layout (no motion): poster, then the copy as cards ---- */
.mamy-crew-stage {
	position: relative;
	overflow: hidden;
	align-self: start;
	aspect-ratio: 16 / 9;
	max-height: 70svh;
	width: 100%;
}
.mamy-crew-poster,
.mamy-crew-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.mamy-crew-poster { object-fit: cover; }
.mamy-crew-canvas { display: block; visibility: hidden; }
.mamy-crew.is-live .mamy-crew-canvas { visibility: visible; }
.mamy-crew.is-live .mamy-crew-poster { visibility: hidden; }
.mamy-crew-smoke,
.mamy-crew-name,
.mamy-crew-plus,
.mamy-crew-studio { display: none; }

.mamy-crew-copy {
	position: relative;
	z-index: 2;
	display: grid;
	gap: 1.5rem;
	padding: calc(min(70svh, 56.25vw) + 2rem) 6% 4rem;
}
.mamy-crew-card { max-width: 34rem; margin: 0; }
.mamy-crew h2,
.mamy-crew h3 { margin: 0; font: 400 1em/.95 var(--pop-font, "Arial Black", sans-serif); letter-spacing: -.02em; text-wrap: balance; }
.mamy-crew h2 { font-size: clamp(2.6rem, 6vw, 6rem); }
.mamy-crew h3 { font-size: clamp(2rem, 3.6vw, 3.6rem); }
.mamy-crew h2 em, .mamy-crew h3 em { font-style: normal; color: #8ff3e9; }
.mamy-crew-maher h3 em { color: #ff9ac8; }
.mamy-crew p { margin: .8rem 0 0; font: 400 clamp(1rem, 1.35vw, 1.2rem)/1.5 var(--body, Arial, sans-serif); }
.mamy-crew .mamy-crew-kicker { margin: 0 0 .5rem; color: #8ff3e9; font: 400 clamp(1.2rem, 2vw, 1.8rem)/1.1 Osaka, var(--pop-font, sans-serif); }
.mamy-crew .mamy-crew-formula { font: 400 clamp(1.8rem, 4vw, 3.6rem)/1.1 var(--pop-font, sans-serif); text-transform: uppercase; }
.mamy-crew-formula .ma { color: #ff9ac8; }
.mamy-crew-formula .my { color: #8ff3e9; }
.mamy-crew-brand img { width: min(320px, 70vw); height: auto; }

/* ---- motion layout: one pinned screen, everything driven by scroll ---- */
@media (min-height: 520px) and (prefers-reduced-motion: no-preference) {
	.mamy-crew.is-motion { min-height: calc(var(--crew-screen) * 9.5); background: var(--crew-paper); }
	.mamy-crew.is-motion .mamy-crew-stage,
	.mamy-crew.is-motion .mamy-crew-copy {
		position: sticky;
		top: 0;
		height: var(--crew-screen);
		max-height: none;
		aspect-ratio: auto;
	}
	.mamy-crew.is-motion .mamy-crew-stage { background: #1b1030; }
	.mamy-crew.is-motion .mamy-crew-copy { display: block; padding: 0; pointer-events: none; overflow: hidden; }

	/* Smoke from the launch still hangs in the air and clears to reveal the planet. */
	.mamy-crew.is-motion .mamy-crew-smoke { display: block; position: absolute; inset: 0; z-index: 3; pointer-events: none; }
	.mamy-crew.is-motion .mamy-crew-smoke::before {
		position: absolute;
		inset: 0;
		background: var(--crew-paper);
		opacity: var(--crew-cover, 1);
		content: "";
	}
	.mamy-crew.is-motion .mamy-crew-smoke i {
		position: absolute;
		left: 50%;
		top: 50%;
		width: max(42vw, 46vh);
		aspect-ratio: 1;
		border-radius: 50%;
		background: radial-gradient(circle at 36% 30%, #fffdf9 0 42%, #fbefea 62%, #efd5e4 86%, #e3c1da 100%);
		box-shadow: 0 0 0 5px var(--crew-ink), inset -18px -22px 0 #ead0e2;
		will-change: transform;
	}

	/* Copy cards float next to the astronauts. */
	.mamy-crew.is-motion .mamy-crew-card {
		position: absolute;
		max-width: min(30rem, 40vw);
		opacity: var(--show, 0);
		translate: 0 calc((1 - var(--show, 0)) * 26px);
		visibility: hidden;
	}
	.mamy-crew.is-motion .mamy-crew-card.is-on { visibility: visible; }
	.mamy-crew.is-motion .mamy-crew-intro { left: 6%; top: 34%; max-width: min(34rem, 40vw); }
	.mamy-crew.is-motion .mamy-crew-intro h2 { color: var(--crew-paper); text-shadow: 0 4px 0 var(--crew-ink); }
	.mamy-crew.is-motion :is(.mamy-crew-maher, .mamy-crew-jeremy) {
		top: 50%;
		padding: 1.2rem 1.4rem 1.3rem;
		border: 3px solid var(--crew-ink);
		border-radius: 22px;
		background: #241538e6;
		box-shadow: 6px 8px 0 var(--crew-ink);
		translate: 0 calc(-50% + (1 - var(--show, 0)) * 26px);
	}
	.mamy-crew.is-motion .mamy-crew-maher { left: 5%; }
	.mamy-crew.is-motion .mamy-crew-jeremy { right: 5%; }
	.mamy-crew.is-motion .mamy-crew-formula,
	.mamy-crew.is-motion .mamy-crew-brand { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

	/* Names above the astronauts: letters that are not part of MAMY drop away. */
	.mamy-crew.is-motion .mamy-crew-name {
		position: absolute;
		z-index: 5;
		display: flex;
		left: 0;
		top: 0;
		font: 400 clamp(2.6rem, 6.5vw, 6.8rem)/.9 var(--pop-font, "Arial Black", sans-serif);
		letter-spacing: -.01em;
		-webkit-text-stroke: 3px var(--crew-ink);
		paint-order: stroke fill;
		text-shadow: 0 6px 0 var(--crew-ink);
		opacity: var(--in, 0);
		translate: -50% -100%;
		scale: calc(var(--zoom, 1) * (.6 + var(--in, 0) * .4));
		transform-origin: 50% 100%;
		will-change: left, top, scale;
	}
	.mamy-crew-name-ma { color: var(--crew-pink); }
	.mamy-crew-name-my { color: var(--crew-turq); }
	.mamy-crew.is-motion .mamy-crew-name span { display: inline-block; overflow: visible; }
	.mamy-crew.is-motion .mamy-crew-name .is-cut {
		max-width: calc((1 - var(--cut, 0)) * 1em);
		opacity: calc(1 - var(--cut, 0) * 1.4);
		translate: 0 calc(var(--cut, 0) * .6em);
		rotate: calc(var(--cut, 0) * 24deg);
	}
	.mamy-crew.is-motion .mamy-crew-plus {
		display: block;
		position: absolute;
		z-index: 5;
		left: 50%;
		top: 0;
		color: var(--crew-paper);
		font: 400 clamp(2.4rem, 6vw, 6rem)/.9 var(--pop-font, sans-serif);
		-webkit-text-stroke: 3px var(--crew-ink);
		paint-order: stroke fill;
		opacity: var(--plus, 0);
		translate: -50% -100%;
		scale: calc(var(--zoom, 1) * var(--plus, 0));
		transform-origin: 50% 100%;
	}

	/* Brush, pencil and ruler orbit the words and sketch the logo. */
	.mamy-crew.is-motion .mamy-crew-studio {
		display: block;
		position: absolute;
		inset: 0;
		z-index: 4;
		pointer-events: none;
		opacity: var(--studio, 0);
	}
	.mamy-crew.is-motion .mamy-crew-studio::before {
		position: absolute;
		inset: 0;
		background: radial-gradient(ellipse at 50% 50%, #fffdf9 0%, var(--crew-paper) 60%, #f6e6ef 100%);
		opacity: var(--paper, 0);
		content: "";
	}
	.mamy-crew-sketch {
		position: absolute;
		left: 50%;
		top: 50%;
		width: min(78vw, 980px);
		translate: -50% -50%;
		overflow: visible;
	}
	.mamy-crew-stroke { stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--draw, 0)); }
	.mamy-crew-stroke.s2 { stroke-dasharray: none; opacity: var(--draw, 0); }
	.mamy-crew-tool {
		--r: min(36vw, 48vh);
		position: absolute;
		left: 50%;
		top: 50%;
		width: clamp(28px, 3.4vw, 46px);
		translate: -50% -50%;
		transform: rotate(calc(var(--orbit, 0deg) + var(--offset))) translateX(var(--r)) rotate(calc(-1 * (var(--orbit, 0deg) + var(--offset)) + var(--tilt)));
		filter: drop-shadow(3px 5px 0 #1a122033);
	}
	.mamy-crew-tool svg { display: block; width: 100%; height: auto; }
	.mamy-crew-brush { --offset: 0deg; --tilt: 35deg; }
	.mamy-crew-pencil { --offset: 120deg; --tilt: -30deg; }
	.mamy-crew-ruler { --offset: 240deg; --tilt: 70deg; width: clamp(24px, 2.8vw, 38px); }
	.mamy-crew-logo {
		position: absolute;
		left: 50%;
		top: 50%;
		width: min(56vw, 640px);
		height: auto;
		translate: -50% -50%;
		opacity: var(--logo, 0);
		scale: calc(.6 + var(--logo, 0) * .4);
		rotate: calc((1 - var(--logo, 0)) * -8deg);
	}
}

@media (max-width: 849px) and (min-height: 520px) and (prefers-reduced-motion: no-preference) {
	.mamy-crew.is-motion :is(.mamy-crew-maher, .mamy-crew-jeremy) {
		top: auto;
		bottom: 5%;
		left: 5%;
		right: 5%;
		max-width: none;
		translate: 0 calc((1 - var(--show, 0)) * 26px);
	}
	.mamy-crew-sketch { width: 96vw; }
	.mamy-crew-tool { --r: 42vw; }
}
