/* =========================================================
 * MATÍAS SYSTEMS — HOME V3
 * ========================================================= */

:root {
	--ms-shell: 1280px;
	--ms-page-gutter: clamp(20px, 4vw, 64px);
	--ms-background: #f5f5f7;
	--ms-surface: #ffffff;
	--ms-ink: #1d1d1f;
	--ms-muted: #6e6e73;
	--ms-blue: #0071e3;
	--ms-blue-hover: #0077ed;
}


/* =========================================================
 * HERO BUSINESS SYSTEM
 * ========================================================= */

.ms-product-hero {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(
			circle at 50% 76%,
			rgba(89, 113, 255, 0.08),
			transparent 36%
		),
		var(--ms-background);
}

.ms-product-hero__inner {
	width: min(
		calc(100% - (var(--ms-page-gutter) * 2)),
		1080px
	);
	margin-inline: auto;
	padding-top: clamp(52px, 6.5vw, 92px);
	text-align: center;
}

.ms-product-hero__title {
	max-width: 900px;
	margin: 0 auto;
	color: var(--ms-ink);
	font-size: clamp(44px, 5.2vw, 72px);
	font-weight: 700;
	line-height: 1.02;
	letter-spacing: -0.055em;
	text-wrap: balance;
}

.ms-product-hero__subtitle {
	max-width: 760px;
	margin: 18px auto 0;
	color: var(--ms-muted);
	font-size: clamp(18px, 1.75vw, 25px);
	font-weight: 400;
	line-height: 1.28;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.ms-product-hero__action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	margin-top: 26px;
	padding: 0 24px;
	border-radius: 999px;
	background: var(--ms-blue);
	color: #ffffff;
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition:
		background-color 160ms ease,
		transform 160ms ease;
}

.ms-product-hero__action:hover {
	background: var(--ms-blue-hover);
	color: #ffffff;
	transform: translateY(-1px);
}

.ms-product-hero__media {
	position: relative;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	width: min(100%, 840px);
	height: clamp(360px, 42vw, 545px);
	margin: 18px auto 0;
	overflow: hidden;
}

.ms-product-hero__image {
	display: block;
	width: auto;
	max-width: none;
	height: 100%;
	object-fit: contain;
	object-position: center top;

	-webkit-mask-image:
		linear-gradient(
			to bottom,
			#000 0%,
			#000 72%,
			rgba(0, 0, 0, 0.88) 82%,
			transparent 100%
		);

	mask-image:
		linear-gradient(
			to bottom,
			#000 0%,
			#000 72%,
			rgba(0, 0, 0, 0.88) 82%,
			transparent 100%
		);
}


/* =========================================================
 * LÍNEA DE SISTEMAS
 * ========================================================= */

.ms-lineup {
	overflow: hidden;
	padding:
		clamp(76px, 8vw, 118px)
		0
		clamp(82px, 9vw, 132px);
	background: #ececf0;
}

.ms-lineup__shell {
	width: min(
		calc(100% - (var(--ms-page-gutter) * 2)),
		var(--ms-shell)
	);
	margin-inline: auto;
}

.ms-lineup__heading {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 32px;
	margin-bottom: 38px;
}

.ms-lineup__title {
	max-width: 780px;
	margin: 0;
	color: var(--ms-ink);
	font-size: clamp(38px, 4.6vw, 64px);
	font-weight: 700;
	line-height: 1.02;
	letter-spacing: -0.052em;
	text-wrap: balance;
}

.ms-lineup__title span {
	color: #77777e;
}

.ms-lineup__controls {
	display: flex;
	flex-shrink: 0;
	gap: 10px;
}

.ms-lineup__control {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(29, 29, 31, 0.08);
	color: var(--ms-ink);
	font-size: 20px;
	cursor: pointer;
	transition:
		background-color 160ms ease,
		opacity 160ms ease;
}

.ms-lineup__control:hover {
	background: rgba(29, 29, 31, 0.14);
}

.ms-lineup__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(370px, 31vw);
	gap: 18px;
	overflow-x: auto;
	padding-bottom: 12px;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	overscroll-behavior-inline: contain;
	-webkit-overflow-scrolling: touch;
}

.ms-lineup__track::-webkit-scrollbar {
	display: none;
}


/* =========================================================
 * CARDS
 * ========================================================= */

.ms-system-card {
	display: flex;
	flex-direction: column;
	min-height: 660px;
	padding: 30px;
	border: 1px solid rgba(29, 29, 31, 0.055);
	border-radius: 30px;
	overflow: hidden;
	background: var(--ms-surface);
	box-shadow:
		0 18px 52px rgba(18, 22, 34, 0.055);
	scroll-snap-align: start;
}

.ms-system-card--business {
	border-color: rgba(255, 255, 255, 0.09);
	background:
		radial-gradient(
			circle at 76% 18%,
			rgba(79, 74, 255, 0.18),
			transparent 38%
		),
		linear-gradient(
			155deg,
			#171725 0%,
			#070708 76%
		);
	color: #f5f5f7;
}

.ms-system-card__category {
	margin: 0 0 14px;
	color: var(--ms-blue);
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.ms-system-card--business .ms-system-card__category {
	color: #9dc6ff;
}

.ms-system-card__title {
	margin: 0;
	color: inherit;
	font-size: clamp(31px, 2.8vw, 43px);
	font-weight: 700;
	line-height: 1.02;
	letter-spacing: -0.045em;
}

.ms-system-card__description {
	min-height: 78px;
	margin: 14px 0 22px;
	color: var(--ms-muted);
	font-size: 16px;
	line-height: 1.5;
}

.ms-system-card--business .ms-system-card__description {
	color: rgba(245, 245, 247, 0.62);
}

.ms-system-card__visual {
	position: relative;
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: center;
	min-height: 330px;
	border-radius: 22px;
	overflow: hidden;
	background: #f0f0f3;
	text-align: center;
}

.ms-system-card--business .ms-system-card__visual {
	border: 1px solid rgba(255, 255, 255, 0.055);
	background: rgba(255, 255, 255, 0.045);
}

.ms-system-card__placeholder {
	max-width: 250px;
	padding: 24px;
}

.ms-system-card__placeholder strong {
	display: block;
	color: var(--ms-ink);
	font-size: 16px;
}

.ms-system-card--business
.ms-system-card__placeholder strong {
	color: #ffffff;
}

.ms-system-card__placeholder span {
	display: block;
	margin-top: 7px;
	color: var(--ms-muted);
	font-size: 13px;
	line-height: 1.4;
}

.ms-system-card--business
.ms-system-card__placeholder span {
	color: rgba(245, 245, 247, 0.46);
}

.ms-system-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 22px;
}

.ms-system-card__meta {
	margin: 0;
	color: var(--ms-ink);
	font-size: 13px;
}

.ms-system-card--business .ms-system-card__meta {
	color: rgba(245, 245, 247, 0.78);
}

.ms-system-card__links {
	display: flex;
	align-items: center;
	gap: 16px;
}

.ms-system-card__links a {
	color: var(--ms-blue);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.ms-system-card--business
.ms-system-card__links a {
	color: #85b8ff;
}


/* =========================================================
 * TABLET
 * ========================================================= */

@media (max-width: 980px) {
	.ms-product-hero__inner {
		width: min(
			calc(100% - 48px),
			820px
		);
	}

	.ms-product-hero__media {
		height: clamp(390px, 58vw, 530px);
	}

	.ms-lineup__track {
		grid-auto-columns: minmax(345px, 72vw);
	}
}


/* =========================================================
 * MOBILE
 * ========================================================= */

@media (max-width: 680px) {
	:root {
		--ms-page-gutter: 20px;
	}

	.ms-product-hero__inner {
		width: calc(100% - 40px);
		padding-top: 54px;
	}

	.ms-product-hero__title {
		font-size: clamp(40px, 12vw, 52px);
		line-height: 1;
	}

	.ms-product-hero__subtitle {
		max-width: 360px;
		margin-top: 15px;
		font-size: 18px;
		line-height: 1.3;
	}

	.ms-product-hero__action {
		min-height: 46px;
		margin-top: 22px;
		padding-inline: 21px;
		font-size: 15px;
	}

	.ms-product-hero__media {
		width: calc(100% + 24px);
		height: clamp(365px, 108vw, 485px);
		margin-top: 18px;
		margin-left: -12px;
	}

	.ms-lineup {
		padding-top: 72px;
		padding-bottom: 92px;
	}

	.ms-lineup__heading {
		align-items: flex-start;
		margin-bottom: 30px;
	}

	.ms-lineup__title {
		max-width: 340px;
		font-size: clamp(37px, 10.8vw, 48px);
	}

	.ms-lineup__controls {
		display: none;
	}

	.ms-lineup__track {
		grid-auto-columns: 86vw;
		gap: 12px;
		overflow: visible;
		overflow-x: auto;
	}

	.ms-system-card {
		min-height: 620px;
		padding: 26px;
		border-radius: 27px;
	}

	.ms-system-card__description {
		min-height: auto;
		margin-bottom: 20px;
	}

	.ms-system-card__visual {
		min-height: 310px;
	}

	.ms-system-card__footer {
		align-items: flex-start;
		flex-direction: column;
	}
}


/* =========================================================
 * REDUCED MOTION
 * ========================================================= */

@media (prefers-reduced-motion: reduce) {
	.ms-product-hero__action,
	.ms-lineup__track {
		scroll-behavior: auto;
		transition: none;
	}
}

/* MS HOME MOBILE V4 START */

/* =========================================================
 * CONTENCIÓN GENERAL
 * ========================================================= */

.ms-product-hero,
.ms-lineup {
	width: 100%;
	max-width: 100%;
}

.ms-product-hero__inner,
.ms-lineup__shell {
	min-width: 0;
}

.ms-product-hero__title,
.ms-product-hero__subtitle,
.ms-lineup__title,
.ms-system-card__title,
.ms-system-card__description {
	max-width: 100%;
	overflow-wrap: break-word;
}

.ms-product-hero__media {
	max-width: 100%;
}

.ms-product-hero__image {
	max-width: 100%;
}

.ms-lineup__track {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overscroll-behavior-inline: contain;
	touch-action: pan-x pan-y;
}

.ms-system-card {
	min-width: 0;
}


/* =========================================================
 * ESCALA EDITORIAL
 * ========================================================= */

.ms-lineup__title {
	font-size: clamp(38px, 4.35vw, 58px);
}


/* =========================================================
 * MOBILE
 * ========================================================= */

@media (max-width: 680px) {
	.ms-product-hero__inner {
		width: calc(100% - 40px);
		padding-top: 54px;
	}

	.ms-product-hero__title {
		font-size: clamp(40px, 11.5vw, 50px);
		line-height: 1.02;
		letter-spacing: -0.052em;
	}

	.ms-product-hero__subtitle {
		max-width: 350px;
		font-size: 18px;
		line-height: 1.32;
		letter-spacing: -0.018em;
	}

	.ms-product-hero__action {
		max-width: 100%;
		padding-inline: 22px;
		white-space: nowrap;
	}

	.ms-product-hero__media {
		width: 100%;
		max-width: 520px;
		height: clamp(360px, 105vw, 475px);
		margin: 20px auto 0;
	}

	.ms-product-hero__image {
		width: auto;
		max-width: 100%;
		height: 100%;
		margin-inline: auto;
	}

	.ms-lineup__shell {
		width: calc(100% - 40px);
	}

	.ms-lineup__heading {
		margin-bottom: 30px;
	}

	.ms-lineup__title {
		max-width: 350px;
		font-size: clamp(38px, 10.4vw, 46px);
		line-height: 1.02;
	}

	.ms-lineup__track {
		grid-auto-columns: calc(100% - 28px);
		gap: 12px;
		padding-right: 28px;
		padding-bottom: 14px;
	}

	.ms-system-card {
		width: auto;
		min-height: 610px;
		padding: 25px;
		border-radius: 28px;
	}

	.ms-system-card__category {
		margin-bottom: 13px;
		font-size: 10px;
	}

	.ms-system-card__title {
		font-size: clamp(32px, 9vw, 39px);
		line-height: 1.03;
	}

	.ms-system-card__description {
		min-height: auto;
		margin: 14px 0 20px;
		font-size: 16px;
		line-height: 1.48;
	}

	.ms-system-card__visual {
		min-height: 285px;
	}

	.ms-system-card__footer {
		align-items: flex-start;
		flex-direction: column;
		gap: 14px;
		margin-top: 20px;
	}

	.ms-system-card__links {
		display: flex;
		flex-wrap: wrap;
		gap: 10px 22px;
		width: 100%;
	}

	.ms-system-card__links a {
		font-size: 14px;
	}
}

/* MS HOME MOBILE V4 END */

/* MS HERO SUBTITLE V5 */

@media (max-width: 680px) {
	.ms-hero-break {
		display: none;
	}
}

/* === MS-LINEUP-MOBILE-FINAL:START === */
/* =========================================================
 * LÍNEA DE SISTEMAS · COMPOSICIÓN MÓVIL FINAL
 * Imagen primero, información después.
 * ========================================================= */

@media (max-width: 767px) {
	.ms-lineup__track {
		grid-auto-columns: calc(100% - 44px);
		gap: 14px;
		padding-right: 44px;
		scroll-padding-inline: 0 44px;
	}

	.ms-system-card {
		display: flex;
		flex-direction: column;
		height: auto;
		min-height: 0;
		padding: 0;
		overflow: hidden;
		border-radius: 30px;
	}

	.ms-system-card__visual {
		order: -10;
		width: auto;
		min-height: clamp(285px, 76vw, 350px);
		margin: 14px 14px 0;
		border-radius: 23px;
		overflow: hidden;
	}

	.ms-system-card__placeholder {
		width: 100%;
		height: 100%;
		min-height: inherit;
		padding: 28px 22px;
	}

	.ms-system-card__category {
		order: -9;
		margin: 26px 24px 10px;
	}

	.ms-system-card__title {
		order: -8;
		margin: 0 24px 13px;
		font-size: clamp(38px, 10.5vw, 47px);
		line-height: 0.98;
		letter-spacing: -0.055em;
	}

	.ms-system-card__description {
		order: -7;
		margin: 0 24px 25px;
		font-size: 17px;
		line-height: 1.48;
	}

	.ms-system-card__footer {
		order: -6;
		display: grid;
		grid-template-columns: 1fr;
		gap: 17px;
		margin-top: auto;
		padding: 0 24px 27px;
	}

	.ms-system-card__meta {
		margin: 0;
	}

	.ms-system-card__links {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 18px;
		flex-wrap: nowrap;
	}

	.ms-system-card__links a {
		white-space: nowrap;
	}

	.ms-system-card--business .ms-system-card__visual {
		border: 1px solid rgba(255, 255, 255, 0.08);
	}

	.ms-system-card--business .ms-system-card__description {
		color: rgba(245, 245, 247, 0.63);
	}

	.ms-system-card--business .ms-system-card__meta {
		color: rgba(245, 245, 247, 0.72);
	}
}
/* === MS-LINEUP-MOBILE-FINAL:END === */
