/*
Theme Name: mjgamedesign
Description: Child theme of Twenty Twenty-Five for the MJ Game Design portfolio, showcasing digital and game design work.
Author: MJ Game Design
Template: twentytwentyfive
Version: 1.1.0
Requires at least: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mjgamedesign
*/

/* ==========================================================================
   Tokens
   Colors, fonts and sizes live in theme.json. These are the extra
   values the layout and motion need.
   ========================================================================== */

:root {
	--mj-plum: var(--wp--preset--color--base, #2c0735);
	--mj-night: var(--wp--preset--color--accent-5, #1e0424);
	--mj-white: var(--wp--preset--color--contrast, #fff);
	--mj-ice: var(--wp--preset--color--accent-1, #97dffc);
	--mj-purple: var(--wp--preset--color--accent-2, #4e148c);
	--mj-gutter: var(--wp--custom--gutter, clamp(1.25rem, 5.2vw, 4.6875rem));
	--mj-header-h: var(--wp--custom--header-height, 8.5rem);
	--mj-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
	--mj-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

	/* The stepped "notch" button shape from the mockup, and its mirror for hover. */
	--mj-nx: 0.9rem;
	--mj-ny: 0.6rem;
	--mj-notch: polygon(0 0, calc(100% - var(--mj-nx)) 0, calc(100% - var(--mj-nx)) var(--mj-ny), 100% var(--mj-ny), 100% 100%, var(--mj-nx) 100%, var(--mj-nx) calc(100% - var(--mj-ny)), 0 calc(100% - var(--mj-ny)));
	--mj-notch-flip: polygon(0 var(--mj-ny), var(--mj-nx) var(--mj-ny), var(--mj-nx) 0, 100% 0, 100% calc(100% - var(--mj-ny)), calc(100% - var(--mj-nx)) calc(100% - var(--mj-ny)), calc(100% - var(--mj-nx)) 100%, 0 100%);
}

html {
	scroll-behavior: smooth;
}

[class*="mj-"],
[class*="mj-"]::before,
[class*="mj-"]::after {
	box-sizing: border-box;
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

::selection {
	background: var(--mj-ice);
	color: var(--mj-plum);
}

:focus-visible {
	outline: 2px solid var(--mj-ice);
	outline-offset: 4px;
}

.has-accent-1-background-color :focus-visible {
	outline-color: var(--mj-plum);
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

/* Template-level blocks sit flush against each other. */
.wp-site-blocks.wp-site-blocks > *,
.mj-main.mj-main > *,
.mj-stack.mj-stack > * {
	margin-block: 0;
}

/* Pages without a full-screen hero leave room for the fixed header. */
.mj-header-wrap ~ main:not(.mj-main) {
	padding-top: calc(var(--mj-header-h) + 2rem);
}

/* Links on the ice-blue sections switch to plum. */
.has-accent-1-background-color a:where(:not(.wp-element-button):not(.mj-button)) {
	color: var(--mj-plum);
}

/* ==========================================================================
   Buttons: the stepped notch shape
   The shape is drawn on ::before so the focus outline is never clipped.
   ========================================================================== */

.wp-block-button__link,
.wp-element-button,
.mj-button,
.mj-next-project a {
	--mj-btn-bg: var(--mj-ice);
	--mj-btn-fg: var(--mj-plum);
	position: relative;
	isolation: isolate;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	padding: 1.15rem 1.9rem;
	border: 0;
	border-radius: 0;
	background: transparent !important;
	color: var(--mj-btn-fg) !important;
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.35s var(--mj-ease);
}

.wp-block-button__link::before,
.wp-element-button::before,
.mj-button::before,
.mj-next-project a::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--mj-btn-bg);
	clip-path: var(--mj-notch);
	transition: clip-path 0.35s var(--mj-ease), background-color 0.25s ease;
}

.wp-block-button__link:hover,
.wp-element-button:hover,
.mj-next-project a:hover,
a.mj-button:hover,
.mj-panel:hover .mj-button {
	transform: translateY(-2px);
}

.wp-block-button__link:hover::before,
.wp-element-button:hover::before,
.mj-next-project a:hover::before,
a.mj-button:hover::before,
.mj-panel:hover .mj-button::before {
	clip-path: var(--mj-notch-flip);
}

.wp-block-button__link:active,
.wp-element-button:active,
.mj-button:active {
	transform: translateY(1px);
}

/* Dark version: on ice blue, and for timeline buttons. Never white on ice. */
.has-accent-1-background-color .wp-block-button__link,
.has-accent-1-background-color .wp-element-button,
.mj-button--dark {
	--mj-btn-bg: var(--mj-plum);
	--mj-btn-fg: var(--mj-white);
}

/* Outline style from the editor's button styles. */
.wp-block-button.is-style-outline > .wp-block-button__link {
	--mj-btn-fg: var(--mj-ice);
}
.wp-block-button.is-style-outline > .wp-block-button__link::before {
	background: transparent;
	box-shadow: inset 0 0 0 2px var(--mj-ice);
}

/* ==========================================================================
   Header: fixed, hides on scroll down, returns on scroll up
   ========================================================================== */

.mj-header-wrap {
	position: fixed;
	inset: 0 0 auto;
	z-index: 100;
	transition: transform 0.45s var(--mj-ease);
}

.admin-bar .mj-header-wrap {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.mj-header-wrap::before {
	content: "";
	position: absolute;
	inset: 0 0 -2.5rem;
	z-index: -1;
	background: linear-gradient(to bottom, color-mix(in srgb, var(--mj-plum) 88%, transparent) 0%, color-mix(in srgb, var(--mj-plum) 60%, transparent) 60%, transparent 100%);
	opacity: 0;
	transition: opacity 0.35s ease;
	pointer-events: none;
}

.mj-header-wrap.is-scrolled::before {
	opacity: 1;
}

.mj-header-wrap.is-hidden {
	transform: translateY(calc(-100% - 2.5rem));
}

.mj-header-wrap:focus-within {
	transform: none;
}

.mj-site-header {
	gap: 2rem;
	padding: clamp(1rem, 2.1vw, 1.875rem) var(--mj-gutter);
}

.mj-site-header > .mj-nav {
	flex: 1;
}

/* Desktop: logo, navigation and language sit in three equal columns, so the
   navigation is centered on the page whatever the logo's width. */
@media (min-width: 600px) {
	.mj-site-header.mj-site-header {
		display: grid;
		grid-template-columns: 1fr auto 1fr;
		align-items: center;
	}

	.mj-site-header > .mj-logo-link {
		justify-self: start;
	}

	.mj-site-header > .mj-nav {
		flex: none;
		justify-self: center;
	}

	.mj-site-header > .mj-lang {
		justify-self: end;
	}
}

/* Phones: menu button sits on the right, next to the language link. */
@media (max-width: 599px) {
	.mj-site-header > .mj-nav {
		flex: 0 0 auto;
		margin-left: auto;
	}
}

.mj-site-header {
	--mj-logo-size: clamp(3rem, 5.5vw, 4.9375rem);
}

.mj-header-wrap.is-scrolled .mj-site-header {
	--mj-logo-size: clamp(2.25rem, 3.8vw, 3.375rem);
}

.mj-logo-link {
	flex: 0 0 auto;
	margin: 0;
}

.mj-logo-link--small {
	--mj-logo-size: 2.5625rem;
}

.mj-logo-anchor {
	display: flex;
	align-items: center;
	gap: calc(var(--mj-logo-size) * 0.3);
	border-radius: 0;
	color: var(--mj-white);
	line-height: 0;
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
}

.mj-logo-svg {
	display: block;
	flex: 0 0 auto;
	width: var(--mj-logo-size);
	height: auto;
	overflow: visible;
	transition: transform 0.5s var(--mj-ease), width 0.45s var(--mj-ease);
}

.mj-logotext {
	display: block;
	flex: 0 0 auto;
	width: calc(var(--mj-logo-size) * 2.677 * 0.7);
	height: calc(var(--mj-logo-size) * 0.7);
	overflow: hidden;
	transition: width 0.45s var(--mj-ease), height 0.45s var(--mj-ease), opacity 0.35s ease, margin 0.45s var(--mj-ease);
}

/* The name only shows while the header is over the hero. */
.mj-header-wrap.is-past-hero .mj-logotext {
	width: 0;
	margin-left: calc(var(--mj-logo-size) * -0.3);
	opacity: 0;
}

.mj-header-wrap.is-past-hero .mj-logo-anchor {
	gap: calc(var(--mj-logo-size) * 0.3);
}

.mj-logo-anchor:hover .mj-logo-svg,
.mj-logo-anchor:focus-visible .mj-logo-svg {
	transform: scale(1.06);
}

.mj-nav,
.mj-nav .wp-block-navigation-item__content {
	font-size: 1rem;
	font-weight: 500;
	--navigation-layout-gap: 2.25rem;
	gap: 2.25rem;
}

.mj-nav a,
.mj-lang a,
.mj-back-link a {
	color: var(--mj-white);
	text-decoration: none;
	background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
	transition: background-size 0.35s var(--mj-ease), color 0.2s ease;
}

.mj-nav a:hover,
.mj-nav a[aria-current="page"],
.mj-nav .current-menu-item > a,
.mj-lang a:hover,
.mj-back-link a {
	background-size: 100% 1px;
}

.mj-back-link a:hover {
	background-size: 0 1px;
}

.mj-nav a:hover,
.mj-lang a:hover {
	color: var(--mj-ice);
}

.mj-lang {
	margin: 0;
	font-size: 1rem;
	font-weight: 500;
}

/* Mobile menu overlay: logo on top, links big and left-aligned in the middle,
   social links small at the bottom. */
.mj-menu-top,
.mj-menu-social {
	display: none;
}

.mj-nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: 0;
	background-color: var(--mj-plum);
}

.mj-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog {
	height: 100%;
}

.mj-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: space-between;
	box-sizing: border-box;
	min-height: 100vh;
	min-height: 100dvh;
	padding: clamp(1rem, 4vw, 1.5rem) var(--mj-gutter) 2rem;
}

.mj-nav .is-menu-open .mj-menu-top {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	--mj-logo-size: 3.25rem;
}

.mj-nav .is-menu-open .mj-menu-top .mj-logotext {
	width: calc(var(--mj-logo-size) * 2.677 * 0.7);
	margin: 0;
	opacity: 1;
}

.mj-nav .is-menu-open .wp-block-navigation__container {
	display: flex;
	flex-direction: column;
	align-items: flex-start !important;
	text-align: left;
	gap: 1.1rem;
	margin-block: auto;
	width: 100%;
}

.mj-nav .is-menu-open .wp-block-navigation-item {
	align-items: flex-start !important;
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(2.25rem, 11vw, 3.25rem);
	font-weight: 600;
	line-height: 1.05;
}

.mj-nav .is-menu-open .wp-block-navigation-item__content {
	font-size: inherit;
}

.mj-nav .is-menu-open .mj-menu-social {
	display: block;
	flex: 0 0 auto;
}

.mj-menu-social ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mj-menu-social a {
	font-size: 1rem;
	font-weight: 500;
}

.mj-nav .wp-block-navigation__responsive-container-close {
	top: clamp(1rem, 4vw, 1.5rem);
	right: var(--mj-gutter);
}

/* ==========================================================================
   Home hero (a Cover block, so the video is swapped in the editor)
   ========================================================================== */

.mj-hero.mj-hero {
	min-height: 100vh;
	min-height: 100svh;
	padding: var(--mj-header-h) var(--mj-gutter) 3.75rem;
	align-items: flex-end;
}

.mj-hero .wp-block-cover__inner-container {
	width: 100%;
	max-width: none !important;
	margin: 0 !important;
}

.mj-hero .wp-block-cover__inner-container > * {
	max-width: none;
	margin-left: 0 !important;
}

.mj-hero__name {
	margin: 0;
	letter-spacing: -0.02em;
}

.mj-rotator {
	margin-top: 0.1em !important;
	font-weight: 500;
	line-height: 1.05;
}

/* No-JS and editor view: the other words sit underneath, faded, as in the mockup. */
.mj-rotator-words {
	margin-top: 0.2em !important;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--xxx-large);
	font-weight: 500;
	line-height: 1.05;
	opacity: 0.4;
}

.mj-rotator-words.is-consumed {
	display: none;
}

.mj-rotator.is-ready {
	margin-bottom: 2.6em !important;
}

.mj-rotator__visual {
	display: inline;
}

.mj-rotator__slot {
	position: relative;
	display: inline-block;
	height: 1.05em;
	vertical-align: top;
	transition: width 0.8s var(--mj-ease-in-out);
}

.mj-rotator__track {
	position: absolute;
	top: 0;
	left: 0;
}

.mj-rotator__rest {
	margin-left: 0.25em;
}

.mj-rotator__word {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	height: 1.05em;
	white-space: nowrap;
	opacity: 0;
	transform: translateY(calc(var(--d, 0) * 1.25em));
	transition: transform 0.8s var(--mj-ease-in-out), opacity 0.8s ease;
}

.mj-rotator__word[data-d="0"] { opacity: 1; }
.mj-rotator__word[data-d="1"] { opacity: 0.4; }
.mj-rotator__word[data-d="2"] { opacity: 0.2; }

/* ==========================================================================
   Project stack: full-screen panels that slide over each other
   Pure CSS (position: sticky), so it works without JavaScript.
   ========================================================================== */

.mj-stack {
	position: relative;
}

.mj-stack > .mj-hero {
	position: sticky !important;
	top: 0;
}

.mj-projects {
	position: relative;
}

.mj-projects__stack {
	position: relative;
}

.mj-panel {
	position: sticky;
	top: 0;
	height: 100vh;
	height: 100svh;
	min-height: 32rem;
	overflow: hidden;
	background: var(--mj-panel-bg, var(--mj-purple));
	box-shadow: 0 -2rem 4rem rgb(15 2 20 / 0.35);
}

.mj-panel[hidden] {
	display: none;
}

.mj-panel__inner {
	position: absolute;
	inset: 0;
	isolation: isolate;
	display: flex;
	align-items: flex-end;
	padding: var(--mj-header-h) var(--mj-gutter) clamp(4rem, 16vh, 9.5rem);
	transform: scale(calc(1 - var(--mj-cover, 0) * 0.06));
	transform-origin: 50% 0;
	will-change: transform;
}

/* Darkens a panel as the next one slides over it (driven by site.js). */
.mj-panel__inner::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	background: var(--mj-night);
	opacity: calc(var(--mj-cover, 0) * 0.55);
	pointer-events: none;
}

.mj-panel__media {
	position: absolute;
	inset: 0;
	z-index: -1;
}

.mj-panel__img,
.mj-panel__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	transition: transform 1.4s var(--mj-ease);
}

.mj-panel:hover .mj-panel__img,
.mj-panel:hover .mj-panel__video {
	transform: scale(1.03);
}

/* One shared overlay for every project, tinted by the project's own color. */
.mj-panel__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(to top right, color-mix(in srgb, var(--mj-panel-bg) 80%, transparent) 0%, transparent 65%),
		linear-gradient(to top, rgb(30 4 36 / 0.55) 0%, transparent 55%);
}

.mj-panel__content {
	max-width: 36rem;
	/* The text sits low in the panel, so it has to move up faster than the next
	   panel rises to stay ahead of it: it is pushed up and fades as the next
	   panel slides over (--mj-cover goes 0 to 1, set by site.js). */
	opacity: calc(1 - var(--mj-cover, 0) * 1.8);
	transform: translateY(calc(var(--mj-cover, 0) * -85vh));
	will-change: transform, opacity;
}

.mj-panel__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--xxx-large);
}

.mj-panel__link {
	color: var(--mj-white) !important;
	text-decoration: none;
}

/* The whole panel is one link: a stretched anchor sits above the content. */
.mj-panel__stretch {
	position: absolute;
	inset: 0;
	z-index: 3;
}

.mj-panel__stretch:focus-visible {
	outline: 3px solid var(--mj-ice);
	outline-offset: -0.75rem;
}

.mj-panel__subtitle {
	margin: 0.25em 0 0;
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 500;
	line-height: 1.2;
}

.mj-panel__excerpt {
	margin: 0.75rem 0 0;
	font-size: var(--wp--preset--font-size--large);
}

.mj-panel .mj-button {
	margin-top: 1.5rem;
}

/* Content rises in as each panel arrives (only once JS is confirmed). */
.mj-js .mj-panel__content > * {
	opacity: 0;
	transform: translateY(1.5rem);
	transition: opacity 0.7s ease, transform 0.9s var(--mj-ease);
}

.mj-js .mj-panel.is-in .mj-panel__content > * {
	opacity: 1;
	transform: none;
}

.mj-js .mj-panel.is-in .mj-panel__content > :nth-child(2) { transition-delay: 0.08s; }
.mj-js .mj-panel.is-in .mj-panel__content > :nth-child(3) { transition-delay: 0.16s; }
.mj-js .mj-panel.is-in .mj-panel__content > :nth-child(4) { transition-delay: 0.24s; }

/* ==========================================================================
   Projects page: heading and sticky category tabs
   ========================================================================== */

.mj-page-head {
	padding: calc(var(--mj-header-h) + clamp(2rem, 10vh, 8rem)) var(--mj-gutter) 0;
	background: var(--mj-plum);
}

.mj-page-head__title {
	margin: 0;
}

.mj-projects.has-tabs {
	background: var(--mj-plum);
}

.mj-tabs {
	position: sticky;
	top: calc(var(--mj-header-h) - 1rem);
	z-index: 20;
	padding: 1.5rem var(--mj-gutter) clamp(2rem, 6vh, 3.5rem);
	transition: top 0.45s var(--mj-ease);
	pointer-events: none;
}

.admin-bar .mj-tabs {
	top: calc(var(--mj-header-h) - 1rem + var(--wp-admin--admin-bar--height, 32px));
}

body.mj-header-hidden .mj-tabs {
	top: 0.5rem;
}

.mj-tabs__list {
	display: flex;
	gap: 1.875rem;
	justify-content: flex-start;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	pointer-events: auto;
}

.mj-tabs__list::-webkit-scrollbar {
	display: none;
}

.mj-tabs__list li {
	flex: 0 0 auto;
	scroll-snap-align: start;
}

.mj-tabs__tab {
	display: inline-block;
	padding: 0.25rem 0;
	color: color-mix(in srgb, var(--mj-white) 40%, transparent) !important;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 2rem;
	font-weight: 600;
	line-height: 1.1;
	text-decoration: none;
	text-shadow: 0 1px 1.5rem rgb(30 4 36 / 0.35);
	transition: color 0.3s ease;
}

.mj-tabs__tab:hover {
	color: color-mix(in srgb, var(--mj-white) 75%, transparent) !important;
}

.mj-tabs__tab[aria-current="page"] {
	color: var(--mj-white) !important;
}

.mj-projects__empty {
	padding: 4rem var(--mj-gutter) 8rem;
	font-size: var(--wp--preset--font-size--large);
}

/* ==========================================================================
   Experience + timeline
   ========================================================================== */

.mj-experience.mj-experience {
	padding: clamp(5rem, 10vw, 9.375rem) var(--mj-gutter);
}

.mj-experience > h2 {
	margin: 0;
}

.mj-contact-links {
	font-size: var(--wp--preset--font-size--large);
}

.mj-timeline {
	margin-top: clamp(3rem, 6vw, 5rem) !important;
}

.mj-timeline__list {
	--mj-rail: 2.5rem;
	position: relative;
	margin: 0 0 0 auto;
	padding: 0;
	width: min(100%, 52.8rem);
	list-style: none;
}

/* The line. */
.mj-timeline__list::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 0.5rem;
	transform: translateX(-50%);
	background: var(--mj-plum);
}

.mj-event {
	position: relative;
	display: grid;
	grid-template-columns: 1fr var(--mj-rail) 1fr;
	column-gap: clamp(2rem, 5vw, 4.5rem);
	align-items: center;
}

.mj-event + .mj-event {
	margin-top: clamp(-10rem, -12vw, -4rem);
}

.mj-event__marker {
	grid-column: 2;
	grid-row: 1;
	justify-self: center;
	width: 1.25rem;
	height: 1.25rem;
	background: var(--mj-plum);
}

.mj-event__media,
.mj-event__body {
	grid-row: 1;
}

.mj-event--right .mj-event__media,
.mj-event--right .mj-event__body {
	grid-column: 3;
}

.mj-event--left .mj-event__media,
.mj-event--left .mj-event__body {
	grid-column: 1;
}

.mj-event__media,
.mj-event__body {
	align-self: start;
}

.mj-event__media {
	width: min(100%, 14.375rem);
	aspect-ratio: 1;
	margin: 0;
	overflow: hidden;
	background: var(--mj-plum);
	transform: rotate(var(--mj-tilt, -4deg));
	transition: transform 0.6s var(--mj-ease);
}

.mj-event--left {
	--mj-tilt: 4deg;
}

.mj-event:hover .mj-event__media {
	transform: rotate(0deg) scale(1.02);
}

.mj-event__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Image and text stack in the same column; push text below the image. */
.mj-event__body {
	padding-top: calc(min(100%, 14.375rem) + 2rem);
}

.mj-event__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--xx-large);
}

.mj-event__period {
	margin: 0.25rem 0 0;
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 600;
	line-height: 1.2;
}

.mj-event__text,
.mj-event__details {
	margin: 0.75rem 0 0;
	max-width: 22rem;
}

.mj-event__details > * {
	margin: 0.5rem 0 0;
}

.mj-event .mj-button {
	margin-top: 1rem;
	font-size: 1rem;
	padding: 1.15rem 1.4rem;
}

/* --- Stage mode: set by site.js on wider screens --------------------------- */

.mj-timeline.is-stage .mj-timeline__stage {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 9rem 1fr;
	column-gap: clamp(2rem, 4vw, 4rem);
	height: clamp(34rem, 78vh, 48rem);
}

.mj-timeline.is-stage .mj-timeline__list {
	position: absolute;
	inset: 0;
	width: auto;
	margin: 0;
}

.mj-timeline.is-stage .mj-timeline__list::before,
.mj-timeline.is-stage .mj-event__marker {
	display: none;
}

.mj-timeline.is-stage .mj-event {
	position: absolute;
	inset: 0;
	margin: 0;
	grid-template-columns: 1fr 9rem 1fr;
	column-gap: clamp(2rem, 4vw, 4rem);
	align-items: center;
	visibility: hidden;
	opacity: 0;
	transform: translateY(calc(var(--mj-dir, 1) * 3rem));
	transition: opacity 0.5s ease, transform 0.8s var(--mj-ease), visibility 0s linear 0.8s;
	pointer-events: none;
}

.mj-timeline.is-stage .mj-event.is-active {
	visibility: visible;
	opacity: 1;
	transform: none;
	transition: opacity 0.6s ease 0.15s, transform 0.9s var(--mj-ease) 0.1s, visibility 0s;
	pointer-events: auto;
}

.mj-timeline.is-stage .mj-event.is-leaving {
	transform: translateY(calc(var(--mj-dir, 1) * -3rem));
}

.mj-timeline.is-stage .mj-event__media {
	transform: rotate(0deg) scale(0.92);
	transition: transform 1s var(--mj-ease) 0.15s;
}

.mj-timeline.is-stage .mj-event.is-active .mj-event__media {
	transform: rotate(var(--mj-tilt, -4deg));
}

.mj-timeline.is-stage .mj-event {
	align-content: center;
}

.mj-timeline.is-stage .mj-event__media,
.mj-timeline.is-stage .mj-event__body {
	align-self: start;
}

/* The rail: line, progress fill, markers and the travelling "player" square. */
.mj-rail {
	grid-column: 2;
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	height: 100%;
	padding: 1rem 0;
}

.mj-rail__track {
	position: relative;
	flex: 1;
	width: 0.5rem;
	background: color-mix(in srgb, var(--mj-plum) 25%, transparent);
}

.mj-rail__fill {
	position: absolute;
	inset: 0;
	background: var(--mj-plum);
	transform-origin: 50% 0;
	transform: scaleY(var(--mj-progress, 0));
	transition: transform 0.9s var(--mj-ease-in-out);
}

.mj-rail__marker {
	position: absolute;
	left: 50%;
	top: var(--mj-at);
	width: 2.75rem;
	height: 2.75rem;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	transform: translate(-50%, -50%);
	cursor: pointer;
}

.mj-rail__marker::before {
	content: "";
	position: absolute;
	inset: 0.75rem;
	background: var(--mj-plum);
	transform: rotate(0deg);
	transition: transform 0.4s var(--mj-ease), background-color 0.3s ease;
}

.mj-rail__marker:hover::before {
	transform: rotate(45deg);
}

.mj-rail__label {
	position: absolute;
	top: 50%;
	left: calc(100% + 0.25rem);
	transform: translate(-0.5rem, -50%);
	white-space: nowrap;
	color: var(--mj-plum);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	opacity: 0;
	transition: opacity 0.3s ease, transform 0.3s var(--mj-ease);
	pointer-events: none;
}

.mj-rail__marker:hover .mj-rail__label,
.mj-rail__marker:focus-visible .mj-rail__label,
.mj-rail__marker[aria-current="step"] .mj-rail__label {
	opacity: 1;
	transform: translate(0, -50%);
}

.mj-rail__player {
	position: absolute;
	left: 50%;
	top: var(--mj-player-at, 0%);
	width: 1.75rem;
	height: 1.75rem;
	background: var(--mj-white);
	box-shadow: 0 0 0 0.375rem var(--mj-plum);
	transform: translate(-50%, -50%) rotate(45deg);
	transition: top 0.9s var(--mj-ease-in-out);
	pointer-events: none;
}

.mj-rail__nav {
	display: flex;
	gap: 0.5rem;
	margin-top: 1.25rem;
}

.mj-rail__btn.mj-rail__btn {
	--mj-nx: 0.4rem;
	--mj-ny: 0.3rem;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0.5rem 0.9rem;
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1;
}

.mj-rail__btn:disabled {
	opacity: 0.35;
	cursor: default;
	transform: none;
}

.mj-rail__count {
	margin-top: 0.75rem;
	color: var(--mj-plum);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	font-variant-numeric: tabular-nums;
}

/* --- Small screens: a single column with the line on the left ------------- */

@media (max-width: 781px) {
	.mj-timeline__list {
		width: 100%;
	}

	.mj-timeline__list::before {
		left: 0.6rem;
	}

	.mj-event,
	.mj-event + .mj-event {
		grid-template-columns: 1.25rem 1fr;
		column-gap: 1.5rem;
		margin-top: 0;
		padding-bottom: 3.5rem;
	}

	.mj-event__marker {
		grid-column: 1;
		align-self: start;
		margin-top: 1rem;
	}

	.mj-event--left .mj-event__media,
	.mj-event--left .mj-event__body,
	.mj-event--right .mj-event__media,
	.mj-event--right .mj-event__body {
		grid-column: 2;
	}

	.mj-event__media {
		width: min(70%, 14rem);
	}
}

/* ==========================================================================
   Featured work / category cards
   ========================================================================== */

.mj-cards.mj-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mj-card.mj-card {
	min-height: 70vh;
	padding: clamp(2rem, 4vw, 3.75rem);
	overflow: hidden;
}

.mj-card .wp-block-cover__image-background,
.mj-card .wp-block-cover__video-background {
	transition: transform 1.4s var(--mj-ease);
}

.mj-card:hover .wp-block-cover__image-background,
.mj-card:hover .wp-block-cover__video-background {
	transform: scale(1.06);
}

.mj-card .wp-block-cover__background {
	transition: opacity 0.6s ease;
}

.mj-card:has(.wp-block-cover__image-background):hover .wp-block-cover__background {
	opacity: 0.5 !important;
}

.mj-card h3 {
	margin: 0;
}

.mj-card h3 a {
	color: var(--mj-white);
	text-decoration: none;
}

/* The whole card is clickable when its heading has a link. */
.mj-card h3 a::after {
	content: "";
	position: absolute;
	inset: -100vmax;
}

.mj-card h3 a:focus-visible {
	outline: none;
}

.mj-card:has(h3 a:focus-visible) {
	outline: 3px solid var(--mj-ice);
	outline-offset: -0.75rem;
}

.mj-card p {
	margin: 0.75rem 0 0;
	font-size: var(--wp--preset--font-size--large);
	transform: translateY(0.25rem);
	opacity: 0.85;
	transition: transform 0.5s var(--mj-ease), opacity 0.5s ease;
}

.mj-card:hover p {
	transform: none;
	opacity: 1;
}

@media (max-width: 781px) {
	.mj-cards.mj-cards {
		grid-template-columns: 1fr;
	}

	.mj-card.mj-card {
		min-height: 45vh;
	}
}

/* ==========================================================================
   Footer
   ========================================================================== */

.mj-site-footer.mj-site-footer {
	padding: 3.75rem var(--mj-gutter) 1.875rem;
}

.mj-site-footer__row {
	gap: 1.25rem;
}

.mj-site-footer__start {
	gap: 1.25rem;
}

.mj-nav--footer,
.mj-nav--social {
	--navigation-layout-gap: 1.25rem;
	gap: 1.25rem;
}

.mj-copyright {
	margin-top: 1.25rem !important;
	opacity: 0.85;
}

/* ==========================================================================
   Single project
   ========================================================================== */

.mj-project-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 100vh;
	min-height: 100svh;
	padding: var(--mj-header-h) var(--mj-gutter) clamp(4rem, 22vh, 12rem);
	overflow: hidden;
}

.mj-project-hero__media {
	position: absolute;
	top: 0;
	right: 0;
	width: 62.3%;
	height: 97.5%;
	overflow: hidden;
	background: var(--mj-project-color, var(--mj-purple));
	clip-path: polygon(11.4% 0, 100% 0, 100% 100%, 0 85.7%);
	animation: mj-hero-wipe 1.2s var(--mj-ease-in-out) both;
}

.mj-project-hero__img,
.mj-project-hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	transform: translate(var(--mj-px, 0), var(--mj-py, 0)) scale(1.06);
	transition: transform 0.8s var(--mj-ease);
	animation: mj-hero-settle 1.8s var(--mj-ease) both;
}

@keyframes mj-hero-wipe {
	from { clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 85.7%); }
	to { clip-path: polygon(11.4% 0, 100% 0, 100% 100%, 0 85.7%); }
}

@keyframes mj-hero-settle {
	from { scale: 1.12; }
	to { scale: 1; }
}

.mj-project-hero__content {
	position: relative;
	z-index: 2;
	max-width: min(52rem, 70%);
	animation: mj-rise 1s var(--mj-ease) 0.3s both;
}

@keyframes mj-rise {
	from { opacity: 0; transform: translateY(2rem); }
	to { opacity: 1; transform: none; }
}

.mj-project-hero__title {
	margin: 0;
	letter-spacing: -0.02em;
	text-shadow: 0 0.25rem 2rem rgb(30 4 36 / 0.35);
}

.mj-project-hero__subtitle {
	margin: 0.2em 0 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(2rem, 1.3rem + 2.6vw, 3.5rem);
	font-weight: 500;
	line-height: 1.1;
}

.mj-project-hero__roles {
	margin: 1.25rem 0 0;
	font-size: var(--wp--preset--font-size--large);
	font-weight: 500;
}

.mj-hero .mj-scroll-cue {
	position: relative;
	display: block;
	left: auto;
	bottom: auto;
	margin-top: 1.5rem;
}

.mj-scroll-cue {
	position: absolute;
	left: var(--mj-gutter);
	bottom: 2rem;
	width: 1.5rem;
	height: 3rem;
}

.mj-scroll-cue::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 0;
	width: 2px;
	height: 100%;
	background: linear-gradient(to bottom, transparent, var(--mj-ice));
	transform-origin: top;
	animation: mj-cue 2.2s var(--mj-ease-in-out) infinite;
}

@keyframes mj-cue {
	0% { transform: scaleY(0); opacity: 1; }
	60% { transform: scaleY(1); opacity: 1; }
	100% { transform: scaleY(1); opacity: 0; }
}

@media (max-width: 781px) {
	.mj-project-hero__media {
		width: 100%;
		height: 62%;
		clip-path: polygon(0 0, 100% 0, 100% 100%, 0 82%);
	}

	@keyframes mj-hero-wipe {
		from { clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); }
		to { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 82%); }
	}

	.mj-project-hero__content {
		max-width: 100%;
	}
}

.mj-project-body.mj-project-body {
	padding-top: clamp(3rem, 8vw, 6rem);
	padding-bottom: clamp(3rem, 8vw, 6rem);
}

.mj-project-content {
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.6;
}

.mj-project-content > * + * {
	margin-block-start: 1.25rem;
}

.mj-project-content h2,
.mj-project-content h3 {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 500;
	letter-spacing: 0;
	line-height: 1.2;
}

.mj-project-content h2 {
	margin-block-start: clamp(2.5rem, 5vw, 3.5rem) !important;
	font-size: var(--wp--preset--font-size--x-large);
}

.mj-project-content h3 {
	margin-block-start: 2rem !important;
	font-size: var(--wp--preset--font-size--large);
}

.mj-project-content h2 + *,
.mj-project-content h3 + * {
	margin-block-start: 0.75rem !important;
}

.mj-project-content :where(.wp-block-image, .wp-block-video, .wp-block-embed, .wp-block-gallery).alignwide,
.mj-project-content :where(.wp-block-image, .wp-block-video, .wp-block-embed, .wp-block-gallery).alignfull {
	margin-block: clamp(2rem, 4vw, 3rem) !important;
}

.mj-project-content img,
.mj-project-content video {
	display: block;
}

/* Project body widths: text is held to a comfortable 780px; images, galleries,
   videos, embeds and layout blocks use the full content width. */
.mj-project-content > :is(p, h1, h2, h3, h4, h5, h6, ul, ol, blockquote, pre, details, .wp-block-heading, .wp-block-list, .wp-block-quote, .wp-block-pullquote, .wp-block-preformatted, .wp-block-verse, .wp-block-table) {
	max-width: 780px;
}

.mj-project-content > :is(.wp-block-image, .wp-block-video, .wp-block-embed, .wp-block-gallery, .wp-block-cover, .wp-block-group, .wp-block-columns, .wp-block-media-text, .wp-block-file, figure, iframe, video):not(.alignleft):not(.alignright) {
	max-width: none;
	width: 100%;
}

.mj-project-content > .wp-block-image:not(.is-resized) img,
.mj-project-content > .wp-block-video video,
.mj-project-content > .wp-block-embed iframe,
.mj-project-content > .wp-block-embed .wp-block-embed__wrapper {
	width: 100%;
	height: auto;
}

.mj-project-content > .wp-block-embed .wp-block-embed__wrapper {
	aspect-ratio: 16 / 9;
}

.mj-project-content > .wp-block-embed iframe {
	height: 100%;
}

/* Gallery style "Scrolling row": a horizontal strip that bleeds off both edges of
   the screen. The first image lines up with the text; the rest scroll sideways. */
.wp-block-gallery.is-style-mj-scroll-row.is-style-mj-scroll-row {
	display: flex !important;
	flex-wrap: nowrap !important;
	gap: 0.75rem !important;
	box-sizing: border-box;
	width: calc(100% + 2 * var(--mj-gutter)) !important;
	max-width: none !important;
	margin-left: calc(-1 * var(--mj-gutter)) !important;
	margin-right: calc(-1 * var(--mj-gutter)) !important;
	padding-left: var(--mj-gutter);
	padding-right: var(--mj-gutter);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-left: var(--mj-gutter);
	scrollbar-width: thin;
	scrollbar-color: var(--mj-ice) transparent;
}

.wp-block-gallery.is-style-mj-scroll-row.is-style-mj-scroll-row > figure.wp-block-image {
	flex: 0 0 auto !important;
	width: auto !important;
	height: clamp(15rem, 34vw, 30.625rem);
	margin: 0 !important;
	scroll-snap-align: start;
}

.wp-block-gallery.is-style-mj-scroll-row.is-style-mj-scroll-row > figure.wp-block-image img {
	width: auto !important;
	height: 100% !important;
	object-fit: cover;
}

/* Image style "Tilted". */
.wp-block-image.is-style-mj-tilt img {
	transform: rotate(-3deg);
	transition: transform 0.6s var(--mj-ease);
}

.wp-block-image.is-style-mj-tilt:hover img {
	transform: none;
}

.mj-project-nav.mj-project-nav {
	margin-top: clamp(4rem, 8vw, 6rem) !important;
	gap: 1.5rem;
}

.mj-back-link {
	margin: 0;
	font-size: 1rem;
}

.mj-next-project {
	margin: 0;
}

/* ==========================================================================
   Scroll reveals (add the class "mj-reveal" to any block)
   ========================================================================== */

.mj-js .mj-reveal {
	opacity: 0;
	transform: translateY(1.5rem);
	transition: opacity 0.8s ease, transform 1s var(--mj-ease);
}

.mj-js .mj-reveal.is-in {
	opacity: 1;
	transform: none;
}

/* ==========================================================================
   Editor-only helpers
   ========================================================================== */

.mj-editor-note {
	padding: 2rem var(--mj-gutter);
	border: 2px dashed currentColor;
	opacity: 0.8;
}

/* ==========================================================================
   Reduced motion: no movement, content always visible
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		transition-delay: 0s !important;
	}

	.mj-panel__inner {
		transform: none;
	}

	.mj-panel__inner::after {
		display: none;
	}

	.mj-panel__content {
		opacity: 1;
		transform: none;
	}

	.mj-js .mj-reveal,
	.mj-js .mj-panel__content > * {
		opacity: 1;
		transform: none;
	}

	.mj-scroll-cue::before {
		animation: none;
	}
}

/* Timeline events rise in on small screens (the list layout). */
.mj-js .mj-timeline:not(.is-stage) .mj-event {
	transition: opacity 0.8s ease, transform 1s var(--mj-ease);
}

.mj-js .mj-timeline:not(.is-stage) .mj-event:not(.is-in) {
	opacity: 0;
	transform: translateY(2rem);
}

@media (prefers-reduced-motion: reduce) {
	.mj-js .mj-timeline:not(.is-stage) .mj-event:not(.is-in) {
		opacity: 1;
		transform: none;
	}
}

/* ==========================================================================
   Cover overlay blend modes (Cover > Styles > Overlay blend mode)
   The cover gets a plum base so the overlay has something to blend with
   even before an image or video is added.
   ========================================================================== */

.wp-block-cover[class*="has-blend-"] {
	isolation: isolate;
	background-color: var(--wp--preset--color--base, #2c0735);
}

.wp-block-cover.has-blend-multiply .wp-block-cover__background,
.wp-block-cover.has-blend-multiply .wp-block-cover__gradient-background,
.wp-block-cover.has-blend-multiply.has-background-dim::before {
	mix-blend-mode: multiply;
}

.wp-block-cover.has-blend-screen .wp-block-cover__background,
.wp-block-cover.has-blend-screen .wp-block-cover__gradient-background,
.wp-block-cover.has-blend-screen.has-background-dim::before {
	mix-blend-mode: screen;
}

.wp-block-cover.has-blend-overlay .wp-block-cover__background,
.wp-block-cover.has-blend-overlay .wp-block-cover__gradient-background,
.wp-block-cover.has-blend-overlay.has-background-dim::before {
	mix-blend-mode: overlay;
}

.wp-block-cover.has-blend-soft-light .wp-block-cover__background,
.wp-block-cover.has-blend-soft-light .wp-block-cover__gradient-background,
.wp-block-cover.has-blend-soft-light.has-background-dim::before {
	mix-blend-mode: soft-light;
}

.wp-block-cover.has-blend-hard-light .wp-block-cover__background,
.wp-block-cover.has-blend-hard-light .wp-block-cover__gradient-background,
.wp-block-cover.has-blend-hard-light.has-background-dim::before {
	mix-blend-mode: hard-light;
}

.wp-block-cover.has-blend-color-dodge .wp-block-cover__background,
.wp-block-cover.has-blend-color-dodge .wp-block-cover__gradient-background,
.wp-block-cover.has-blend-color-dodge.has-background-dim::before {
	mix-blend-mode: color-dodge;
}

.wp-block-cover.has-blend-color-burn .wp-block-cover__background,
.wp-block-cover.has-blend-color-burn .wp-block-cover__gradient-background,
.wp-block-cover.has-blend-color-burn.has-background-dim::before {
	mix-blend-mode: color-burn;
}

.wp-block-cover.has-blend-darken .wp-block-cover__background,
.wp-block-cover.has-blend-darken .wp-block-cover__gradient-background,
.wp-block-cover.has-blend-darken.has-background-dim::before {
	mix-blend-mode: darken;
}

.wp-block-cover.has-blend-lighten .wp-block-cover__background,
.wp-block-cover.has-blend-lighten .wp-block-cover__gradient-background,
.wp-block-cover.has-blend-lighten.has-background-dim::before {
	mix-blend-mode: lighten;
}

.wp-block-cover.has-blend-difference .wp-block-cover__background,
.wp-block-cover.has-blend-difference .wp-block-cover__gradient-background,
.wp-block-cover.has-blend-difference.has-background-dim::before {
	mix-blend-mode: difference;
}

.wp-block-cover.has-blend-exclusion .wp-block-cover__background,
.wp-block-cover.has-blend-exclusion .wp-block-cover__gradient-background,
.wp-block-cover.has-blend-exclusion.has-background-dim::before {
	mix-blend-mode: exclusion;
}

.wp-block-cover.has-blend-hue .wp-block-cover__background,
.wp-block-cover.has-blend-hue .wp-block-cover__gradient-background,
.wp-block-cover.has-blend-hue.has-background-dim::before {
	mix-blend-mode: hue;
}

.wp-block-cover.has-blend-saturation .wp-block-cover__background,
.wp-block-cover.has-blend-saturation .wp-block-cover__gradient-background,
.wp-block-cover.has-blend-saturation.has-background-dim::before {
	mix-blend-mode: saturation;
}

.wp-block-cover.has-blend-color .wp-block-cover__background,
.wp-block-cover.has-blend-color .wp-block-cover__gradient-background,
.wp-block-cover.has-blend-color.has-background-dim::before {
	mix-blend-mode: color;
}

.wp-block-cover.has-blend-luminosity .wp-block-cover__background,
.wp-block-cover.has-blend-luminosity .wp-block-cover__gradient-background,
.wp-block-cover.has-blend-luminosity.has-background-dim::before {
	mix-blend-mode: luminosity;
}


/* ==========================================================================
   Regular pages (About, Contact ...)
   ========================================================================== */

.mj-page-body.mj-page-body {
	padding-top: clamp(2rem, 5vw, 3.5rem);
	padding-bottom: clamp(4rem, 9vw, 7rem);
}

.mj-page-body > * + * {
	margin-block-start: 1.25rem;
}

.mj-page-body h2 {
	margin-block-start: clamp(2rem, 4vw, 3rem);
	font-size: var(--wp--preset--font-size--xx-large);
}
