/* Mirai Prod – Core: gallery, forms, sticky CTA. Colors come from the theme palette with fallbacks. */
:root {
	--mpc-red: var(--wp--preset--color--accent-1, #d62839);
	--mpc-ink: var(--wp--preset--color--contrast, #14161c);
	--mpc-green: var(--wp--preset--color--accent-3, #1f7a4d);
	--mpc-radius: 14px;
}

/* ---------- Gallery ---------- */
.mp-gallery {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}
.mp-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.mp-filter {
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	padding: 0.45rem 0.95rem;
	border-radius: 999px;
	border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
	background: transparent;
	color: inherit;
	cursor: pointer;
}
.mp-filter.is-active,
.mp-filter:hover {
	background: var(--mpc-ink);
	color: #fff;
	border-color: var(--mpc-ink);
}
.mp-filter:focus-visible,
.mp-choice:focus-within,
.mp-video-play:focus-visible {
	outline: 2px solid var(--mpc-red);
	outline-offset: 2px;
}
.mp-videos {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
	gap: 1.25rem;
}
.mp-video {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	position: relative;
	min-width: 0;
}
.mp-video[hidden] {
	display: none;
}
.mp-video-media {
	width: 100%;
	max-width: 100%;
	aspect-ratio: 9 / 16;
	border-radius: var(--mpc-radius);
	object-fit: cover;
	background: #22252e;
	display: block;
}
.mp-video-placeholder {
	position: relative;
	background:
		radial-gradient(120% 70% at 30% 20%, #2d313c 0%, transparent 60%),
		linear-gradient(160deg, #22252e, #14161c);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
}
.mp-rec {
	position: absolute;
	top: 0.8rem;
	left: 0.9rem;
	font: 600 0.72rem/1 var(--wp--preset--font-family--fira-code, ui-monospace, monospace);
	letter-spacing: 0.08em;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}
.mp-rec::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--mpc-red);
}
@media (prefers-reduced-motion: no-preference) {
	.mp-rec::before {
		animation: mp-blink 1.4s steps(2, start) infinite;
	}
}
@keyframes mp-blink {
	to {
		visibility: hidden;
	}
}
.mp-video-soon {
	font-size: 0.85rem;
	opacity: 0.75;
}
.mp-video-play {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	aspect-ratio: 9 / 16;
	border: 0;
	background: transparent;
	cursor: pointer;
	border-radius: var(--mpc-radius);
}
.mp-video-play::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 56px;
	height: 56px;
	margin: -28px 0 0 -28px;
	border-radius: 50%;
	background: rgb(255 255 255 / 0.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z' fill='%2314161C'/%3E%3C/svg%3E") center/26px no-repeat;
	transition: opacity 0.2s;
}
.mp-video.is-playing .mp-video-play::after {
	opacity: 0;
}
.mp-video-meta {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}
.mp-video-tag {
	font: 500 0.72rem/1.2 var(--wp--preset--font-family--fira-code, ui-monospace, monospace);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--mpc-red);
}
.mp-video-title {
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.35;
}

/* Hero variant: three staggered phones */
.mp-gallery--hero .mp-videos {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.9rem;
	align-items: start;
}
.mp-gallery--hero .mp-video:nth-child(2) {
	margin-top: 2.5rem;
}
.mp-gallery--hero .mp-video:nth-child(3) {
	margin-top: 1rem;
}
.mp-gallery--hero .mp-video-meta {
	display: none;
}
.mp-gallery--hero .mp-video-media {
	box-shadow: 0 24px 50px -28px rgb(20 22 28 / 0.55);
}

/* ---------- Forms ---------- */
.mp-form {
	display: flex;
	flex-direction: column;
	gap: 1.1rem;
	font-size: 0.98rem;
}
.mp-form fieldset {
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;
}
.mp-form legend {
	font-size: 1.25rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	margin-bottom: 0.9rem;
	padding: 0;
}
.mp-sublegend {
	font-weight: 700;
	margin: 1.1rem 0 0.6rem;
}
.mp-progress {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.4rem;
	font: 500 0.72rem/1.2 var(--wp--preset--font-family--fira-code, ui-monospace, monospace);
	letter-spacing: 0.05em;
	text-transform: uppercase;
}
.mp-progress li {
	border-top: 3px solid color-mix(in srgb, currentColor 20%, transparent);
	padding-top: 0.4rem;
	opacity: 0.6;
}
.mp-progress li.is-done,
.mp-progress li.is-current {
	border-top-color: var(--mpc-red);
	opacity: 1;
}
.mp-choices {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
	gap: 0.6rem;
}
.mp-choices--stack {
	grid-template-columns: 1fr;
}
.mp-choice {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	padding: 0.85rem 1rem;
	border: 1.5px solid color-mix(in srgb, currentColor 22%, transparent);
	border-radius: 10px;
	cursor: pointer;
	position: relative;
	transition: border-color 0.15s, background-color 0.15s;
}
.mp-choice:hover {
	border-color: color-mix(in srgb, currentColor 55%, transparent);
}
.mp-choice input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.mp-choice:has(input:checked) {
	border-color: var(--mpc-red);
	background: color-mix(in srgb, var(--mpc-red) 12%, transparent);
}
.mp-choice-label {
	font-weight: 700;
}
.mp-choice-detail {
	font-size: 0.86rem;
	opacity: 0.75;
}
.mp-fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.9rem 1rem;
}
.mp-fields > * {
	margin: 0;
	min-width: 0;
}
.mp-fields .mp-full {
	grid-column: 1 / -1;
}
@media (max-width: 600px) {
	.mp-fields {
		grid-template-columns: 1fr;
	}
}
.mp-fields label {
	display: block;
	font-size: 0.88rem;
	font-weight: 600;
	margin-bottom: 0.3rem;
}
.mp-form input[type="text"],
.mp-form input[type="email"],
.mp-form input[type="tel"],
.mp-form input[type="url"],
.mp-form select,
.mp-form textarea {
	width: 100%;
	box-sizing: border-box;
	font: inherit;
	padding: 0.7rem 0.85rem;
	border-radius: 8px;
	border: 1.5px solid color-mix(in srgb, currentColor 22%, transparent);
	background: color-mix(in srgb, currentColor 4%, transparent);
	color: inherit;
}
.mp-form select option {
	color: #14161c;
}
.mp-form input:focus,
.mp-form select:focus,
.mp-form textarea:focus {
	outline: none;
	border-color: var(--mpc-red);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--mpc-red) 25%, transparent);
}
.mp-form [aria-invalid="true"] {
	border-color: var(--mpc-red);
}
.mp-consent {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	font-size: 0.86rem;
}
.mp-consent input {
	margin-top: 0.25rem;
	accent-color: var(--mpc-red);
	flex: none;
}
.mp-consent label {
	font-weight: 400;
	margin: 0;
}
.mp-checkset {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.2rem;
}
.mp-checkset legend {
	font-size: 0.88rem;
	font-weight: 600;
	margin-bottom: 0.4rem;
	width: 100%;
}
.mp-checkset label {
	display: inline-flex;
	gap: 0.4rem;
	align-items: center;
	font-weight: 500;
	margin: 0;
}
.mp-checkset input {
	accent-color: var(--mpc-red);
}
.mp-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.mp-estimate {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	flex-wrap: wrap;
	padding: 0.9rem 1rem;
	border-radius: 10px;
	background: color-mix(in srgb, var(--mpc-red) 12%, transparent);
	margin-bottom: 1rem;
}
.mp-estimate span {
	font-size: 0.88rem;
	font-weight: 600;
}
.mp-estimate strong {
	font-size: 1.35rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}
.mp-nav {
	display: flex;
	gap: 0.75rem;
	align-items: center;
	flex-wrap: wrap;
}
.mp-nav .wp-element-button {
	cursor: pointer;
	border: 0;
}
.mp-nav .wp-element-button[disabled] {
	opacity: 0.6;
	cursor: wait;
}
.mp-back {
	font: inherit;
	font-weight: 600;
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	padding: 0.5rem 0;
	opacity: 0.8;
}
.mp-error {
	margin: 0;
	padding: 0.7rem 0.9rem;
	border-radius: 8px;
	border: 1.5px solid var(--mpc-red);
	font-weight: 600;
	font-size: 0.92rem;
}
.mp-success {
	padding: 1.25rem;
	border-radius: var(--mpc-radius);
	border: 1.5px solid var(--mpc-green);
	background: color-mix(in srgb, var(--mpc-green) 10%, transparent);
}
.mp-success p {
	margin: 0 0 0.5rem;
}
.mp-success-title {
	font-size: 1.3rem;
	font-weight: 800;
}
.mp-form.is-sent > :not(.mp-success) {
	display: none;
}

/* ---------- Sticky mobile CTA ---------- */
.mp-sticky-cta {
	display: none;
}
@media (max-width: 781px) {
	.mp-sticky-cta {
		display: block;
		position: fixed;
		left: max(12px, env(safe-area-inset-left, 0px));
		right: max(12px, env(safe-area-inset-right, 0px));
		bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		z-index: 60;
		text-align: center;
		text-decoration: none;
		box-shadow: 0 12px 30px -10px rgb(20 22 28 / 0.5);
	}
	body {
		padding-bottom: 72px;
	}
}

/* ---------- Article call-to-action box ---------- */
.mp-cta-box {
	background: var(--wp--preset--color--contrast, #14161c);
	color: #f7f5f2;
	border-radius: var(--mpc-radius);
	padding: 1.5rem 1.5rem 1.25rem;
	margin-block: 2.5rem 1rem;
}
.mp-cta-box p {
	margin: 0 0 0.75rem;
}
.mp-cta-box-title {
	font-size: 1.35rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	display: flex;
	align-items: center;
	gap: 0.6rem;
}
.mp-cta-box-title::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--mpc-red);
	flex: none;
}
.mp-cta-box .wp-element-button {
	display: inline-block;
	text-decoration: none;
	color: #fff;
}
