/* ==========================================================================
   MIRZAX CO: homepage sections (template-parts/home/*)
   ========================================================================== */

/* ---------- Hero ---------- */
.mx-home-hero {
	--hero-bg: var(--mx-ink);
	--hero-text: var(--mx-thread);
	--hero-muted: var(--mx-muted);
	--hero-accent: var(--mx-gold);
	--hero-line: rgba(242, 207, 133, 0.22);
	position: relative;
	overflow: hidden;
	background: var(--hero-bg);
	color: var(--hero-text);
}
.mx-chrome-light .mx-home-hero {
	--hero-bg: #f1f3ec;
	--hero-text: var(--mx-ink);
	--hero-muted: var(--mx-text-muted);
	--hero-accent: #8a6420;
	--hero-line: rgba(138, 100, 32, 0.3);
}
.mx-home-hero::before {
	content: "";
	position: absolute;
	left: -10%;
	bottom: -38%;
	width: 70%;
	aspect-ratio: 1;
	border: 1.5px dashed var(--hero-line);
	border-radius: 50%;
	pointer-events: none;
}
.mx-home-hero__grid {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	align-items: center;
	gap: clamp(32px, 5vw, 80px);
	padding-block: clamp(48px, 7vw, 104px) clamp(56px, 8vw, 120px);
}
.mx-home-hero__kicker {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 22px;
	padding: 8px 16px 8px 12px;
	border: 1px dashed var(--hero-line);
	border-radius: 999px;
	color: var(--hero-accent);
	font-size: 14px;
	font-weight: 600;
	animation: mx-rise 0.7s var(--mx-ease-out) 0.1s backwards;
}
.mx-home-hero__title {
	margin: 0;
	max-width: 15ch;
	color: var(--hero-text);
	font-size: clamp(40px, 6.4vw, 84px);
	font-weight: 800;
	font-stretch: 82%;
	line-height: 0.98;
	letter-spacing: -0.025em;
	text-wrap: balance;
	animation: mx-rise 0.8s var(--mx-ease-out) 0.18s backwards;
}
.mx-home-hero__lead {
	max-width: 52ch;
	margin: 22px 0 0;
	color: var(--hero-muted);
	font-size: clamp(16.5px, 1.5vw, 19px);
	line-height: 1.6;
	animation: mx-rise 0.8s var(--mx-ease-out) 0.28s backwards;
}
.mx-home-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 32px;
	animation: mx-rise 0.8s var(--mx-ease-out) 0.36s backwards;
}
.mx-chrome-light .mx-home-hero .mx-btn--ghost { border-color: rgba(16, 32, 25, 0.35); color: var(--mx-ink); }
.mx-home-hero__stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0;
	max-width: 560px;
	margin: 44px 0 0;
	animation: mx-rise 0.8s var(--mx-ease-out) 0.44s backwards;
}
.mx-home-hero__stats div { padding: 0 18px; border-left: 1px dashed var(--hero-line); }
.mx-home-hero__stats div:first-child { padding-left: 0; border-left: 0; }
.mx-home-hero__stats dt {
	color: var(--hero-accent);
	font-size: clamp(28px, 3vw, 38px);
	font-weight: 800;
	font-stretch: 80%;
	line-height: 1;
}
.mx-home-hero__stats dd { margin: 8px 0 0; color: var(--hero-muted); font-size: 13.5px; line-height: 1.4; }

/* Product collage */
.mx-home-hero__visual {
	position: relative;
	aspect-ratio: 1 / 1.02;
	max-width: 620px;
	width: 100%;
	justify-self: end;
}
.mx-home-hero__frame {
	position: absolute;
	display: block;
	overflow: hidden;
	border-radius: 22px;
	background: var(--mx-cotton);
	box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.55);
	text-decoration: none;
	transition: transform 0.6s var(--mx-ease-out), box-shadow 0.6s var(--mx-ease);
	animation: mx-frame-in 1s var(--mx-ease-out) backwards;
}
.mx-home-hero__frame::after {
	content: "";
	position: absolute;
	inset: 9px;
	border: 1.5px dashed rgba(16, 32, 25, 0.28);
	border-radius: 15px;
	pointer-events: none;
}
.mx-home-hero__frame img { width: 100%; height: 100%; object-fit: cover; }
.mx-home-hero__frame--1 { left: 18%; top: 4%; width: 58%; height: 76%; z-index: 2; --r: -2deg; animation-delay: 0.25s; }
.mx-home-hero__frame--2 { left: 0; top: 34%; width: 38%; height: 50%; z-index: 3; --r: -7deg; animation-delay: 0.4s; }
.mx-home-hero__frame--3 { right: 0; top: 30%; width: 36%; height: 48%; z-index: 1; --r: 6deg; animation-delay: 0.52s; }
.mx-home-hero__frame { transform: rotate(var(--r, 0deg)); }
.mx-home-hero__frame:hover { transform: rotate(0deg) translateY(-6px); z-index: 4; box-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.6); }
@keyframes mx-frame-in {
	from { opacity: 0; transform: translateY(40px) rotate(0deg) scale(0.96); }
}
.mx-home-hero__tag {
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 16px;
	padding: 8px 12px;
	border-radius: 10px;
	background: rgba(16, 32, 25, 0.86);
	color: var(--mx-thread);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.3s var(--mx-ease), transform 0.4s var(--mx-ease-out);
}
.mx-home-hero__frame:hover .mx-home-hero__tag,
.mx-home-hero__frame:focus-visible .mx-home-hero__tag { opacity: 1; transform: none; }
.mx-home-hero__badge {
	position: absolute;
	right: 4%;
	bottom: 2%;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 12px 18px 12px 14px;
	border-radius: 999px;
	background: var(--mx-gold);
	color: var(--mx-ink);
	font-size: 14px;
	font-weight: 650;
	box-shadow: 0 18px 36px -18px rgba(0, 0, 0, 0.5);
	animation: mx-rise 0.7s var(--mx-ease-out) 0.9s backwards;
}

@media (max-width: 959px) {
	.mx-home-hero__grid { grid-template-columns: 1fr; }
	.mx-home-hero__visual { justify-self: center; max-width: 520px; aspect-ratio: 1 / 0.9; }
}
@media (max-width: 559px) {
	.mx-home-hero__stats { grid-template-columns: 1fr 1fr 1fr; }
	.mx-home-hero__stats div { padding: 0 10px; }
	.mx-home-hero__stats dd { font-size: 12.5px; }
	.mx-home-hero__actions .mx-btn { flex: 1 1 100%; }
	.mx-home-hero__badge { font-size: 13px; padding: 10px 14px 10px 12px; }
}

/* ---------- Categories (bento) ---------- */
.mx-catgrid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-auto-rows: minmax(220px, 26vw);
	gap: clamp(14px, 1.6vw, 22px);
	margin: 0;
	padding: 0;
	list-style: none;
}
@media (min-width: 1400px) { .mx-catgrid { grid-auto-rows: 330px; } }
.mx-catcard:first-child { grid-row: span 2; }
.mx-catcard a {
	position: relative;
	display: block;
	height: 100%;
	overflow: hidden;
	border-radius: 20px;
	background: var(--mx-cotton);
	color: var(--mx-thread);
	text-decoration: none;
	isolation: isolate;
}
.mx-catcard__media { position: absolute; inset: 0; z-index: -1; }
.mx-catcard__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 1s var(--mx-ease-out);
}
.mx-catcard a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(to top, rgba(10, 22, 17, 0.88) 0%, rgba(10, 22, 17, 0.45) 38%, rgba(10, 22, 17, 0) 66%);
}
.mx-catcard a:hover .mx-catcard__media img { transform: scale(1.06); }
.mx-catcard__body {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: end;
	gap: 4px 16px;
	padding: clamp(18px, 2vw, 26px);
}
.mx-catcard__name {
	grid-column: 1;
	font-size: clamp(22px, 2.2vw, 30px);
	font-weight: 750;
	font-stretch: 86%;
	line-height: 1.05;
}
.mx-catcard:first-child .mx-catcard__name { font-size: clamp(28px, 3.2vw, 44px); }
.mx-catcard__subs { grid-column: 1; color: rgba(231, 230, 220, 0.82); font-size: 13.5px; line-height: 1.45; }
.mx-catcard__go {
	grid-column: 2;
	grid-row: 1 / span 2;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--mx-gold);
	color: var(--mx-ink);
	transition: transform 0.4s var(--mx-ease-out);
}
.mx-catcard a:hover .mx-catcard__go { transform: translateX(4px) rotate(-30deg); }
.mx-catcard a:focus-visible { outline: 3px solid var(--mx-ink); outline-offset: 3px; }

@media (max-width: 959px) {
	.mx-catgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(200px, 38vw); }
	.mx-catcard:first-child { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 559px) {
	.mx-catgrid { grid-template-columns: 1fr; grid-auto-rows: 220px; }
	.mx-catcard:first-child { grid-column: auto; }
}

/* ---------- Process steps ---------- */
.mx-home-process { background: var(--mx-cotton); padding-top: var(--mx-section-y) !important; }
.mx-steps {
	--g: clamp(16px, 2vw, 28px);
	position: relative;
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: var(--g);
	margin: 0;
	padding: 0;
	list-style: none;
}
.mx-steps::before {
	content: "";
	position: absolute;
	top: 32px;
	left: 32px;
	right: calc((100% - 4 * var(--g)) / 5 - 32px);
	height: 2px;
	color: var(--mx-gold-deep);
	background: repeating-linear-gradient(90deg, currentColor 0 10px, transparent 10px 17px);
	transform-origin: left center;
	opacity: 0.7;
}
.mx-js .mx-steps::before { transform: scaleX(0); transition: transform 1.6s var(--mx-ease-out) 0.2s; }
.mx-js .mx-steps:has(.is-revealed)::before { transform: scaleX(1); }
.mx-step { position: relative; }
.mx-step__icon {
	position: relative;
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var(--mx-ink);
	color: var(--mx-gold);
	box-shadow: 0 0 0 8px var(--mx-cotton);
}
.mx-step__num {
	position: absolute;
	top: -6px;
	left: 48px;
	display: grid;
	place-items: center;
	min-width: 30px;
	height: 24px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--mx-gold);
	color: var(--mx-ink);
	font-size: 12px;
	font-weight: 800;
}
.mx-step__title { margin: 22px 0 8px; font-size: 19px; font-weight: 700; font-stretch: 92%; color: var(--mx-ink); }
.mx-step__text { margin: 0; color: var(--mx-text-muted); font-size: 15px; line-height: 1.55; }

@media (max-width: 1023px) {
	.mx-steps { grid-template-columns: 1fr; gap: 0; max-width: 560px; }
	.mx-steps::before {
		top: 32px;
		bottom: 32px;
		left: 31px;
		right: auto;
		width: 2px;
		height: auto;
		background: repeating-linear-gradient(180deg, currentColor 0 10px, transparent 10px 17px);
		transform-origin: center top;
	}
	.mx-js .mx-steps::before { transform: scaleY(0); }
	.mx-js .mx-steps:has(.is-revealed)::before { transform: scaleY(1); }
	.mx-step {
		display: grid;
		grid-template-columns: 64px minmax(0, 1fr);
		column-gap: 20px;
		padding-bottom: 28px;
	}
	.mx-step__icon { grid-row: span 2; }
	.mx-step__title { margin: 6px 0 4px; }
	.mx-step__num { left: 46px; }
}

/* ---------- Featured products ---------- */
.mx-home-products { padding-top: var(--mx-section-y) !important; }

/* ---------- Branding ---------- */
.mx-home-brand__grid {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	gap: clamp(32px, 5vw, 80px);
	align-items: start;
}
.mx-home-brand__intro { position: sticky; top: calc(var(--mx-header-h) + 32px); }
.mx-home-brand__intro .mx-btn { margin-top: 26px; }
.mx-chrome-light .mx-home-brand .mx-btn--ghost,
.mx-home-brand .mx-btn--ghost { border-color: rgba(16, 32, 25, 0.35); color: var(--mx-ink); }
.mx-home-brand .mx-btn--ghost:hover { border-color: var(--mx-ink); background: rgba(16, 32, 25, 0.04); }
.mx-methods {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.mx-method {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px;
	border: 1px solid var(--mx-line-light);
	border-radius: 16px;
	background: var(--mx-surface);
	transition: border-color 0.3s var(--mx-ease), transform 0.4s var(--mx-ease-out), box-shadow 0.3s var(--mx-ease);
}
.mx-method:hover { border-color: rgba(16, 32, 25, 0.25); box-shadow: var(--mx-shadow-sm); }
.mx-method__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mx-method__text strong { color: var(--mx-ink); font-size: 16.5px; }
.mx-method__text span { color: var(--mx-text-muted); font-size: 14px; line-height: 1.45; }

/* Swatches: each shows the letter M in that technique */
.mx-swatch {
	flex: none;
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	border-radius: 14px;
	background: #e7e9e1;
	font: 900 40px/1 var(--mx-font);
	font-stretch: 75%;
	transition: transform 0.5s var(--mx-ease-out);
}
.mx-method:hover .mx-swatch { transform: rotate(-4deg) scale(1.05); }
.mx-swatch--screen { background: var(--mx-ink); color: var(--mx-gold); }
.mx-swatch--puff { background: #e9e2d2; color: #f7f3ea; text-shadow: 0 1px 0 #cfc6b2, 0 2px 0 #c5bba5, 0 3px 6px rgba(0, 0, 0, 0.25); }
.mx-swatch--embroidery { background: #2b3a55; color: transparent; -webkit-text-stroke: 2px #f2cf85; }
.mx-swatch--embroidery span { background: repeating-linear-gradient(45deg, #f2cf85 0 2px, transparent 2px 4px); -webkit-background-clip: text; background-clip: text; }
.mx-swatch--chenille { background: #e8e1cf; }
.mx-swatch--chenille span {
	padding: 4px 6px;
	border: 3px solid #102019;
	border-radius: 8px;
	background: #b3262c;
	color: #f6eedb;
	font-size: 30px;
	box-shadow: 0 0 0 3px #f6eedb inset;
}
.mx-swatch--dtf { background: #f4f2ec; }
.mx-swatch--dtf span { background: linear-gradient(135deg, #e85d3a, #f2cf85 45%, #3a8f6b 75%, #2b5ea8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mx-swatch--labels { background: #f4f2ec; }
.mx-swatch--labels span {
	padding: 6px 8px;
	border-radius: 3px;
	background: var(--mx-ink);
	color: var(--mx-gold);
	font-size: 18px;
	font-stretch: 100%;
	letter-spacing: 0.08em;
	box-shadow: 0 0 0 1px var(--mx-ink), inset 0 0 0 2px var(--mx-gold);
}

@media (max-width: 959px) {
	.mx-home-brand__grid { grid-template-columns: 1fr; }
	.mx-home-brand__intro { position: static; }
}
@media (max-width: 559px) {
	.mx-methods { grid-template-columns: 1fr; }
}

/* ---------- Why us (dark band) ---------- */
.mx-home-why {
	background: var(--mx-ink);
	color: var(--mx-muted);
	padding-top: var(--mx-section-y) !important;
}
.mx-chrome-light .mx-home-why { background: var(--mx-ink); }
.mx-home-why .mx-section__title { color: var(--mx-thread); }
.mx-why {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(14px, 1.6vw, 22px);
	margin: 0;
	padding: 0;
	list-style: none;
}
.mx-why__item {
	position: relative;
	padding: 28px 24px 26px;
	border-radius: 18px;
	background: var(--mx-ink-raised);
}
.mx-why__item::before {
	content: "";
	position: absolute;
	inset: 8px;
	border: 1px dashed rgba(242, 207, 133, 0.28);
	border-radius: 12px;
	pointer-events: none;
	transition: border-color 0.3s var(--mx-ease);
}
.mx-why__item:hover::before { border-color: rgba(242, 207, 133, 0.6); }
.mx-why__icon {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 14px;
	background: var(--mx-gold);
	color: var(--mx-ink);
}
.mx-why__item h3 { margin: 20px 0 8px; color: var(--mx-thread); font-size: 19px; font-stretch: 92%; }
.mx-why__item p { margin: 0; font-size: 15px; line-height: 1.6; }
@media (max-width: 1023px) { .mx-why { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 559px) { .mx-why { grid-template-columns: 1fr; } }

/* ---------- Blog ---------- */
.mx-home-blog { padding-top: var(--mx-section-y) !important; }
.mx-home-content { padding-top: var(--mx-section-y) !important; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.mx-home-hero__kicker,
	.mx-home-hero__title,
	.mx-home-hero__lead,
	.mx-home-hero__actions,
	.mx-home-hero__stats,
	.mx-home-hero__frame,
	.mx-home-hero__badge { animation: none; }
	.mx-home-hero__frame:hover { transform: rotate(var(--r, 0deg)); }
	.mx-js .mx-steps::before { transform: none !important; transition: none; }
	.mx-catcard a:hover .mx-catcard__media img,
	.mx-catcard a:hover .mx-catcard__go,
	.mx-method:hover .mx-swatch { transform: none; }
}
