/* ── Home layout ────────────────────────────────────────── */

.home .site-main {
	padding: 0;
}

.home-section__inner {
	max-width: var(--seghetti-container);
	margin: 0 auto;
	padding: 0 32px;
}

.home-eyebrow {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--seghetti-text);
}

.home-eyebrow--light {
	color: rgba(255, 255, 255, 0.8);
}

.home-section__title {
	margin: 0 0 40px;
	font-size: clamp(28px, 4vw, 40px);
	font-weight: 700;
	line-height: 1.15;
	color: var(--seghetti-text-dark);
}

.home-section__title--light {
	color: var(--seghetti-white);
}

.home-placeholder {
	background: linear-gradient(135deg, #eceae4 0%, #dedbd3 100%);
}

/* ── Hero ───────────────────────────────────────────────── */

.home-hero {
	position: relative;
	overflow: hidden;
	min-height: clamp(340px, 48vh, 560px);
	--home-hero-video-scale: 0.5;
	--home-hero-padding-left: clamp(8px, 1.2vw, 16px);
	display: flex;
	align-items: flex-start;
}

.home-hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	background-color: #151515;
}

.home-hero__video,
.home-hero__mobile-slide-image {
	position: absolute;
	top: 50%;
	left: 50%;
	width: auto;
	height: auto;
	min-width: 100%;
	min-height: 100%;
	transform: translate(-50%, -50%);
	object-fit: cover;
	object-position: center center;
}

.home-hero__mobile-carousel {
	display: none;
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.home-hero__mobile-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity var(--home-hero-slide-duration, 800ms) ease;
}

.home-hero__mobile-slide.is-active {
	opacity: 1;
}

.home-hero__video {
	display: block;
	transform: translate(-50%, -50%) scale(var(--home-hero-video-scale, 1));
}

.home-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(0, 0, 0, 0.52) 0%,
		rgba(0, 0, 0, 0.2) 24%,
		rgba(0, 0, 0, 0.28) 55%,
		rgba(0, 0, 0, 0.42) 100%
	);
}

.home-hero__inner {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: calc(var(--seghetti-header-height) + 6px) var(--seghetti-page-padding) 20px
		var(--home-hero-padding-left);
	pointer-events: none;
	align-self: flex-start;
}

@media (min-width: 1025px) {
	.home-hero__inner {
		padding-top: calc(var(--seghetti-header-height) - 4px);
	}

	.home-hero__overlay-card {
		max-width: 280px;
		padding: 14px 18px;
	}

	.home-hero__title {
		font-size: clamp(14px, 1.25vw, 18px);
	}
}

.home-hero__overlay-card {
	max-width: 320px;
	padding: 18px 20px;
	background-color: var(--seghetti-blue);
	border-radius: 20px;
	box-shadow: 0 16px 32px rgba(26, 95, 212, 0.16);
	pointer-events: auto;
}

.home-hero__overlay-card .home-eyebrow {
	margin-bottom: 8px;
	font-size: 15px;
	letter-spacing: 0.1em;
}

.home-hero__title {
	margin: 0;
	font-size: clamp(18px, 2vw, 24px);
	font-weight: 700;
	line-height: 1.2;
	color: var(--seghetti-white);
}

/* ── Decorative background detail ───────────────────────── */

.home-section--has-decor {
	--home-decor-height: clamp(80px, 9vw, 120px);
}

.home-section--has-decor::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background-image: var(--home-decor-image);
	background-repeat: no-repeat;
	background-size: auto var(--home-decor-height);
	opacity: 1;
}

.home-section--decor-bottom-left::before {
	background-position: left bottom;
}

.home-section--decor-bottom-right::before {
	background-position: right bottom;
}

.home-section--has-decor .home-section__inner {
	position: relative;
	z-index: 1;
}

/* ── Categories ───────────────────────────────────────────── */

.home-categories {
	position: relative;
	overflow: hidden;
	padding: 24px 0 80px;
	background-color: var(--seghetti-bg);
}

/* Reserva el alto del detalle decorativo para que no quede debajo de las cards. */
.home-categories.home-section--has-decor {
	padding-bottom: calc(var(--home-decor-height) + 24px);
}

.home-categories .home-section__title {
	margin-bottom: 28px;
}

.home-categories__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.home-category-card {
	display: flex;
	flex-direction: column;
	transition: transform 0.25s ease;
}

.home-category-card:hover,
.home-category-card:focus-visible {
	transform: translateY(-4px);
}

.home-category-card__media {
	overflow: hidden;
	aspect-ratio: 3 / 2;
	border-radius: 20px;
	background-color: #eceae4;
}

.home-category-card__image,
.home-category-card__media .home-placeholder {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center center;
	transition: transform 0.4s ease;
}

.home-category-card:hover .home-category-card__image,
.home-category-card:focus-visible .home-category-card__image,
.home-category-card:hover .home-category-card__media .home-placeholder,
.home-category-card:focus-visible .home-category-card__media .home-placeholder {
	transform: scale(1.04);
}

.home-category-card__body {
	position: relative;
	z-index: 1;
	margin: -12px 36px 0;
	padding: 12px 16px 14px;
	text-align: center;
	background-color: #f1f0eb;
	border-radius: 14px;
	transition: box-shadow 0.25s ease;
}

.home-category-card:hover .home-category-card__body,
.home-category-card:focus-visible .home-category-card__body {
	box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
}

.home-category-card__title {
	margin: 0 0 4px;
	font-size: 17px;
	font-weight: 700;
	color: var(--seghetti-text-dark);
}

.home-category-card__description {
	margin: 0;
	font-size: 12px;
	line-height: 1.4;
	color: var(--seghetti-text);
}

/* ── Brands marquee ───────────────────────────────────────── */

.home-brands {
	padding: 64px 0 72px;
	background-color: var(--seghetti-bg);
	overflow: hidden;
}

.home-brands--own {
	padding: 32px 0 40px;
	overflow: visible;
}

.home-brands--own .home-brands__title {
	margin-bottom: 24px;
}

.home-brands--own .home-brands__logo {
	width: 220px;
	height: 96px;
}

@media (min-width: 641px) {
	.home-brands--own .home-brands__viewport {
		overflow: visible;
		cursor: default;
		touch-action: auto;
		-webkit-mask-image: none;
		mask-image: none;
	}

	.home-brands--own .home-brands__track {
		flex-wrap: wrap;
		width: 100%;
		will-change: auto;
		transform: none !important;
	}

	.home-brands--own .home-brands__item {
		flex: 0 0 20%;
		width: 20%;
		max-width: 20%;
		min-width: 0;
	}
}

@media (max-width: 1024px) and (min-width: 641px) {
	.home-brands--own .home-brands__item {
		flex: 0 0 33.333%;
		width: 33.333%;
		max-width: 33.333%;
	}
}

.home-brands__title {
	margin: 0 0 40px;
	font-size: clamp(20px, 2.4vw, 26px);
	font-weight: 700;
	line-height: 1.2;
	color: var(--seghetti-text-dark);
}

.home-brands__viewport {
	position: relative;
	overflow: hidden;
	cursor: grab;
	touch-action: pan-y;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.home-brands__viewport.is-dragging {
	cursor: grabbing;
	user-select: none;
}

.home-brands__viewport.is-dragging .home-brands__link {
	transform: none;
	pointer-events: none;
}

.home-brands__track {
	display: flex;
	align-items: center;
	width: max-content;
	margin: 0;
	padding: 0;
	list-style: none;
	will-change: transform;
}

.home-brands__item {
	flex: 0 0 auto;
	padding: 0 24px;
}

.home-brands__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 108px;
	padding: 0 8px;
	transition: transform 0.25s ease;
}

.home-brands__item:hover .home-brands__link {
	transform: translateY(-2px);
}

.home-brands__logo {
	display: block;
	width: 264px;
	max-width: 100%;
	height: 115px;
	object-fit: contain;
	object-position: center center;
}

.home-brands__name {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: center;
	color: var(--seghetti-text);
	transition: color 0.2s ease;
}

.home-brands__item:hover .home-brands__name {
	color: var(--seghetti-blue);
}

@media (prefers-reduced-motion: reduce) {
	.home-brands__viewport {
		overflow-x: auto;
	}
}

/* ── Reasons ──────────────────────────────────────────────── */

.home-reasons {
	position: relative;
	overflow: hidden;
	padding: 20px 0 20px;
	background-color: var(--seghetti-blue);
}

.home-reasons:not(.home-reasons--has-decor) .home-section__inner {
	padding-bottom: 0;
}

.home-reasons--has-decor {
	--home-reasons-decor-width: clamp(120px, 14vw, 210px);
	padding-bottom: calc(44px + clamp(20px, 4vw, 52px));
}

.home-reasons--has-decor::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	z-index: 0;
	width: var(--home-reasons-decor-width);
	height: clamp(96px, 12vw, 170px);
	background-image: var(--home-reasons-decor-image);
	background-repeat: no-repeat;
	background-position: left bottom;
	background-size: contain;
	pointer-events: none;
}

.home-reasons .home-section__inner {
	position: relative;
	z-index: 1;
	padding-top: 0;
	padding-bottom: 4px;
	padding-left: 4px;
	padding-right: 4px;
}

.home-reasons__intro {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 30px;
}

.home-reasons__intro .home-eyebrow {
	margin-bottom: 0;
}

.home-reasons__intro .home-section__title {
	margin-bottom: 0;
}

.home-reasons__board {
	--home-reasons-grid-gap: 20px;
	position: relative;
	margin-top: 20px;
	margin-bottom: 8px;
	margin-inline: -4px;
	width: calc(100% + 8px);
}

.home-reasons__stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px 18px;
	margin-top: 32px;
	justify-items: center;
}

.home-reasons__stat {
	max-width: 200px;
	text-align: center;
}

.home-reasons__grid {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--home-reasons-grid-gap);
}

.home-reasons__stat-value {
	margin: 0 0 4px;
	font-size: clamp(18px, 1.8vw, 22px);
	font-weight: 700;
	line-height: 1;
	color: var(--seghetti-white);
}

.home-reasons__stat-label {
	margin: 0;
	font-size: 12px;
	line-height: 1.35;
	color: rgba(255, 255, 255, 0.85);
}

.home-reasons__item {
	padding: 16px;
	background-color: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 12px;
}

.home-reasons__item--02 {
	background-color: var(--seghetti-gray-light);
	border-color: rgba(255, 255, 255, 0.18);
}

.home-reasons__item--04,
.home-reasons__item--06 {
	background-color: var(--seghetti-gray-dark);
	border-color: rgba(255, 255, 255, 0.14);
}

[data-home-reasons-reveal].is-reveal-initialized {
	opacity: 0;
	transform: translateY(28px);
	pointer-events: none;
	transition:
		opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1) var(--card-reveal-delay, 0ms),
		transform 0.75s cubic-bezier(0.22, 1, 0.36, 1) var(--card-reveal-delay, 0ms);
}

[data-home-reasons-reveal].is-reveal-initialized.is-revealed {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

[data-home-reasons-reveal].is-reveal-initialized [data-home-reasons-reveal-item] {
	opacity: 0;
	transform: translateY(16px);
	transition:
		opacity 0.55s ease var(--reveal-delay, 0ms),
		transform 0.55s ease var(--reveal-delay, 0ms);
}

[data-home-reasons-reveal].is-reveal-initialized.is-revealed [data-home-reasons-reveal-item] {
	opacity: 1;
	transform: none;
}

.home-reasons__number {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	color: rgba(255, 255, 255, 0.7);
}

.home-reasons__item-title {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 700;
	color: var(--seghetti-white);
}

.home-reasons__item-description {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.85);
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 1024px) {
	.home-hero {
		min-height: clamp(300px, 58vw, 440px);
		--home-hero-padding-left: 4px;
		align-items: stretch;
	}

	.home-hero__inner {
		position: absolute;
		inset: auto auto 14px var(--home-hero-padding-left);
		width: auto;
		max-width: calc(100% - 24px);
		padding: 0 12px 0 0;
	}

	.home-hero__overlay-card {
		max-width: min(250px, 72vw);
		padding: 14px 16px;
		border-radius: 14px;
	}

	.home-hero__overlay-card .home-eyebrow {
		margin-bottom: 4px;
		font-size: 11px;
		letter-spacing: 0.08em;
	}

	.home-hero__title {
		font-size: 15px;
		line-height: 1.25;
	}

	.home-hero__video {
		display: none;
	}

	.home-hero__mobile-carousel {
		display: block;
		background-color: #eceae4;
	}

	.home-section--has-decor {
		--home-decor-height: clamp(64px, 10vw, 90px);
	}

	.home-categories {
		padding-top: 28px;
	}

	.home-category-card__media {
		aspect-ratio: 3 / 2;
	}

	.home-category-card__title {
		font-size: 17px;
	}

	.home-categories__grid,
	.home-reasons__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.home-reasons__stats {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		margin-top: 28px;
	}
}

@media (max-width: 640px) {
	.home-section__inner {
		padding-left: 20px;
		padding-right: 20px;
	}

	.home-hero {
		min-height: clamp(320px, 72vw, 460px);
	}

	.home-hero__inner {
		bottom: 12px;
	}

	.home-hero__overlay-card {
		max-width: min(220px, 68vw);
		padding: 12px 14px;
		border-radius: 12px;
	}

	.home-hero__overlay-card .home-eyebrow {
		font-size: 10px;
	}

	.home-hero__title {
		font-size: 14px;
	}

	.home-category-card__media {
		aspect-ratio: 3 / 2;
	}

	.home-categories__grid {
		gap: 18px;
	}

	.home-category-card__title {
		font-size: 17px;
	}

	.home-categories__grid,
	.home-reasons__grid,
	.home-reasons__stats {
		grid-template-columns: 1fr;
	}

	.home-reasons--has-decor::after {
		width: min(60vw, 180px);
		height: clamp(72px, 22vw, 120px);
		opacity: 0.92;
	}

	.home-brands__item {
		padding: 0 12px;
	}

	.home-brands__link {
		min-height: 100px;
	}

	.home-brands__logo {
		width: 216px;
		height: 86px;
		max-width: 100%;
	}

	.home-brands--own .home-brands__logo.home-brands__logo--landscape-md,
	.home-brands__logo.home-brands__logo--landscape-md {
		width: 168px;
		height: 72px;
	}

	.home-brands--own {
		padding: 24px 0 28px;
	}
}

@media (prefers-reduced-motion: reduce) {
	[data-home-reasons-reveal].is-reveal-initialized,
	[data-home-reasons-reveal].is-reveal-initialized [data-home-reasons-reveal-item] {
		opacity: 1;
		transform: none;
		transition: none;
	}
}
