/* ═════════════════════════════════════════
   Xan Cerámica — banners del inicio
   Escenas en capas · promo doble · cinta de colores ·
   foto comprable · cifras
   ═════════════════════════════════════════ */

/* ── Escenas de portada ──────────────────── */
.scenes { padding-top: clamp(12px, 2vw, 28px); }
.scenes__stack { display: grid; }
.scene {
	grid-area: 1 / 1;
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	align-items: center;
	gap: clamp(32px, 5vw, 80px);
	visibility: hidden;
	pointer-events: none;
}
.scene.is-active, .scene.is-leaving { visibility: visible; }
.scene.is-active { z-index: 2; pointer-events: auto; }
.scene.is-leaving { z-index: 1; }

.scene__eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; font-size: 14px; color: var(--ink-2); }
.scene__eyebrow .chip { width: 14px; height: 14px; }
.scene__title { margin: 0 0 24px; font-size: clamp(2.7rem, 5.8vw, 5.6rem); line-height: 1.02; letter-spacing: -.018em; }
.scene__lead { max-width: 28em; margin-bottom: 34px; font-size: 1.1rem; color: var(--ink-2); }
.scene__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }

.scene__art { position: relative; height: min(calc(100svh - 250px), 760px); min-height: 500px; }
.layer { position: absolute; }
.scene.is-active .layer { will-change: transform; }
.layer--tile { left: 2%; top: 38%; width: 19%; height: 27%; z-index: 1; }
.layer--img1 { top: 0; right: 0; width: 63%; height: 86%; z-index: 2; }
.layer--img3 { left: 13%; top: 5%; width: 25%; height: 29%; z-index: 3; }
.layer--img2 { left: 0; bottom: 0; width: 44%; height: 49%; z-index: 4; }
.layer--prod { right: 3%; bottom: 3%; z-index: 5; width: min(300px, 48%); }

.scene__img { width: 100%; height: 100%; margin: 0; overflow: hidden; background: var(--clay); }
.layer--img2 .scene__img, .layer--img3 .scene__img { box-shadow: 0 0 0 8px var(--bg); }
.scene__img img { width: 100%; height: 100%; object-fit: cover; }
.scene__tile {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 1px;
	background: radial-gradient(circle at 50% 12%, var(--bg) 0 6%, transparent 6.8%), var(--accent);
	transform-origin: 50% 12%;
}
.scene__prod {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px 10px 10px;
	background: var(--surface);
	border: 1px solid var(--line);
	box-shadow: 0 22px 44px -26px rgba(47, 45, 45, .5);
	text-decoration: none;
	color: var(--ink);
	transition: transform .4s var(--ease-out);
}
.scene__prod:hover { transform: translateY(-3px); }
.scene__prod-img img { display: block; width: 58px; height: 58px; object-fit: cover; background: var(--clay); }
.scene__prod-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.scene__prod-info small { font-size: 11px; color: var(--ink-3); }
.scene__prod-info b { overflow: hidden; font-size: 14px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.scene__prod-info em { font-style: normal; font-size: 13px; color: var(--ink-2); }

/* Estados de animación.
   "oculto" = escena inactiva, o primera carga antes de que el script esté listo. */
/* La foto principal de la primera escena no se oculta al cargar (mejor LCP):
   solo hace un acercamiento suave. Las demás capas sí entran con barrido. */
.scene:not(.is-active):not(.is-leaving) .scene__img,
.js:not(.no-motion) .scenes:not(.is-ready) .scene:not(.is-active) .scene__img { clip-path: inset(100% 0 0 0); }
.scene:not(.is-active):not(.is-leaving) .layer--img2 .scene__img,
.js:not(.no-motion) .scenes:not(.is-ready) .scene .layer--img2 .scene__img { clip-path: inset(0 100% 0 0); }
.scene:not(.is-active):not(.is-leaving) .layer--img3 .scene__img,
.js:not(.no-motion) .scenes:not(.is-ready) .scene .layer--img3 .scene__img { clip-path: inset(0 0 100% 0); }
.scene .scene__img img { transform: scale(1.16); }
.scene .layer--img1 { --ld: .05s; }
.scene .layer--img3 { --ld: .4s; }
.scene .layer--img2 { --ld: .55s; }
.scenes.is-ready .scene.is-active .scene__img { clip-path: inset(0 0 0 0); transition: clip-path 1.3s var(--ease-io) var(--ld, 0s); }
.js:not(.no-motion) .scenes:not(.is-ready) .scene.is-active .layer--img1 .scene__img img { transform: scale(1.06); }
.scenes.is-ready .scene.is-active .scene__img img,
.scene.is-leaving .scene__img img,
.no-motion .scene .scene__img img,
html:not(.js) .scene .scene__img img { transform: none; transition: transform 2.2s var(--ease-out) var(--ld, 0s); }

.scene:not(.is-active):not(.is-leaving) .scene__tile,
.js:not(.no-motion) .scenes:not(.is-ready) .scene__tile { opacity: 0; }
.scenes.is-ready .scene.is-active .scene__tile { animation: xan-hang 2.2s var(--ease-out) .5s both; }

.scene:not(.is-active):not(.is-leaving) .scene__prod,
.js:not(.no-motion) .scenes:not(.is-ready) .scene__prod { opacity: 0; transform: translate3d(0, 18px, 0); }
.scenes.is-ready .scene.is-active .scene__prod { opacity: 1; transform: none; transition: opacity .8s var(--ease-out) 1s, transform .8s var(--ease-out) 1s; }

.scene:not(.is-active):not(.is-leaving) .scene__eyebrow,
.scene:not(.is-active):not(.is-leaving) .scene__lead,
.scene:not(.is-active):not(.is-leaving) .scene__actions { opacity: 0; transform: translate3d(0, 16px, 0); }
/* Primera carga: el texto ya es visible (cuenta para LCP) y solo se desliza. */
.js:not(.no-motion) .scenes:not(.is-ready) .scene.is-active .scene__eyebrow,
.js:not(.no-motion) .scenes:not(.is-ready) .scene.is-active .scene__lead,
.js:not(.no-motion) .scenes:not(.is-ready) .scene.is-active .scene__actions { transform: translate3d(0, 16px, 0); }
.scenes.is-ready .scene.is-active .scene__eyebrow,
.scenes.is-ready .scene.is-active .scene__lead,
.scenes.is-ready .scene.is-active .scene__actions { opacity: 1; transform: none; transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); }
.scenes.is-ready .scene.is-active .scene__eyebrow { transition-delay: .05s; }
.scenes.is-ready .scene.is-active .scene__lead { transition-delay: .55s; }
.scenes.is-ready .scene.is-active .scene__actions { transition-delay: .7s; }
.scene:not(.is-active):not(.is-leaving) [data-split] .w__i { transform: translate3d(0, 108%, 0); transition: none; }

.scene.is-leaving .scene__text,
.scene.is-leaving .layer > * { opacity: 0; transition: opacity .5s var(--ease); }

@keyframes xan-hang {
	0% { opacity: 0; transform: translate3d(0, -48px, 0) rotate(-14deg); }
	30% { opacity: 1; transform: translate3d(0, 0, 0) rotate(8deg); }
	50% { transform: rotate(-5deg); }
	68% { transform: rotate(3deg); }
	84% { transform: rotate(-1.2deg); }
	100% { opacity: 1; transform: none; }
}
@keyframes xan-scale { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Navegación de escenas */
.scenes__nav { display: flex; align-items: flex-end; gap: 28px; margin-top: 32px; }
.scenes__tabs { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 20px; }
.scenes__tab {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: baseline;
	gap: 0 10px;
	padding: 0 0 4px;
	border: 0;
	background: none;
	color: var(--ink-3);
	text-align: left;
	cursor: pointer;
	transition: color .3s var(--ease);
}
.scenes__tab:hover, .scenes__tab.is-active { color: var(--ink); }
.scenes__bar { grid-column: 1 / -1; order: -1; position: relative; display: block; height: 2px; margin-bottom: 12px; overflow: hidden; background: var(--line); }
.scenes__bar b { position: absolute; inset: 0; background: var(--accent, var(--ink)); transform: scaleX(0); transform-origin: left; }
.scenes__tab.is-active .scenes__bar b { transform: scaleX(1); }
.scenes.is-playing .scenes__tab.is-active .scenes__bar b { animation: xan-scale var(--dur, 7000ms) linear both; }
.scenes__num { font-size: 13px; font-variant-numeric: tabular-nums; }
.scenes__label { font-family: var(--serif-d); font-size: 1.3rem; line-height: 1.2; }
.scenes__pause { padding: 6px 0; border: 0; background: none; font: 500 14px var(--sans); color: var(--ink-2); cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: .35em; }

@media (max-width: 860px) {
	.scene { grid-template-columns: 1fr; gap: 28px; align-items: start; }
	.scene__art { order: -1; height: auto; min-height: 0; aspect-ratio: 1 / 1.04; }
	.scene__title { font-size: clamp(2.4rem, 10vw, 3.4rem); }
	.layer--prod { width: min(260px, 64%); right: 2%; bottom: 2%; }
	.scene__prod { padding: 8px 12px 8px 8px; }
	.scene__prod-img img { width: 46px; height: 46px; }
	.layer--img2 .scene__img, .layer--img3 .scene__img { box-shadow: 0 0 0 5px var(--bg); }
	.scenes__nav { gap: 16px; margin-top: 24px; }
	.scenes__tabs { gap: 12px; }
	.scenes__num { display: none; }
	.scenes__label { font-size: 1rem; }
}

/* ── Banner promocional doble ────────────── */
.promos__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; }
.promo {
	position: relative;
	display: block;
	min-height: clamp(440px, 44vw, 620px);
	overflow: hidden;
	background: var(--clay);
	color: var(--ink);
	text-decoration: none;
}
.promo__media { position: absolute; inset: 0; }
.promo__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-out); }
.promo__panel {
	position: absolute;
	left: 24px;
	bottom: 24px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: min(430px, calc(100% - 48px));
	padding: 28px 28px 24px;
	background: var(--accent);
	transition: transform .7s var(--ease-out);
}
.promo--2 .promo__panel { top: 24px; right: 24px; bottom: auto; left: auto; }
.promo__tag { font-size: 13px; font-weight: 500; }
.promo__title { font-family: var(--serif-d); font-size: clamp(1.9rem, 3vw, 2.7rem); line-height: 1.05; }
.promo__text { font-size: 15px; line-height: 1.5; color: rgba(47, 45, 45, .82); }
.promo__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 8px; padding-top: 14px; border-top: 1px solid rgba(47, 45, 45, .22); }
.promo__price { font-size: 15px; font-weight: 500; }
.promo__price del { opacity: .6; margin-right: 6px; }
.promo__price ins { text-decoration: none; }
.promo__cta { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: 15px; font-weight: 500; }
.promo__cta svg { transition: transform .4s var(--ease-out); }
.promo__tile {
	position: absolute;
	top: -6px;
	right: 44px;
	z-index: 3;
	width: 44px;
	height: 66px;
	background: radial-gradient(circle at 50% 22%, var(--clay) 0 5px, transparent 5.8px), var(--accent);
	box-shadow: 0 10px 20px -12px rgba(47, 45, 45, .5);
	transform-origin: 50% 0;
}
.promo--2 .promo__tile { right: auto; left: 44px; }
@media (hover: hover) {
	.promo:hover .promo__media img { transform: scale(1.05); }
	.promo:hover .promo__panel { transform: translate3d(0, -6px, 0); }
	.promo--2:hover .promo__panel { transform: translate3d(0, 6px, 0); }
	.promo:hover .promo__cta svg { transform: translateX(5px); }
	.promo:hover .promo__tile { animation: xan-swing 1.4s var(--ease-out); }
}
@media (max-width: 860px) {
	.promos__grid { grid-template-columns: 1fr; gap: 16px; }
	.promo { min-height: 480px; }
	.promo__panel, .promo--2 .promo__panel { left: 14px; right: 14px; bottom: 14px; top: auto; width: auto; padding: 22px 20px 18px; }
	.promo--2 .promo__tile { left: auto; right: 44px; }
}

/* ── Cinta de colores ────────────────────── */
.ribbon { margin-top: var(--sp); padding: 36px 0 28px; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ribbon__row { overflow: hidden; white-space: nowrap; }
.ribbon__track { display: inline-flex; width: max-content; animation: xan-marquee 110s linear infinite; }
.ribbon__row--b { margin-top: 8px; }
.ribbon__row--b .ribbon__track { animation-duration: 70s; animation-direction: reverse; }
.ribbon.is-paused .ribbon__track,
.ribbon:hover .ribbon__track { animation-play-state: paused; }
.ribbon__set { display: inline-flex; align-items: center; }
.ribbon__row--a { font-size: clamp(2.4rem, 6vw, 5.4rem); }
.ribbon__row--a .ribbon__item { padding: 0 .28em; font-family: var(--serif-d); line-height: 1.18; }
.ribbon__sep {
	display: inline-block;
	flex: none;
	width: .3em;
	height: .42em;
	margin: 0 .18em;
	background: radial-gradient(circle at 50% 18%, var(--bg) 0 11%, transparent 13%), var(--c);
	transform: rotate(-8deg);
}
.ribbon__row--b .ribbon__item { display: inline-flex; align-items: center; gap: 10px; padding: 0 1.1em; font-family: var(--serif); font-style: italic; font-size: clamp(1.05rem, 1.8vw, 1.5rem); color: var(--ink-2); }
.ribbon__row--b .chip { width: 14px; height: 14px; }
.ribbon__note { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin: 22px auto 0; font-size: 15px; color: var(--ink-2); }
@keyframes xan-marquee { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }

/* ── Foto comprable ──────────────────────── */
.shoppable__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: clamp(32px, 6vw, 96px); }
.shoppable__photo { position: relative; background: var(--clay); }
.shoppable__photo img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.spot { position: absolute; left: var(--x); top: var(--y); z-index: 2; width: 0; height: 0; }
.spot.is-open { z-index: 4; }
.spot__btn {
	position: absolute;
	left: -18px;
	top: -18px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--surface);
	box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
	cursor: pointer;
	transition: transform .3s var(--ease-out), background-color .3s;
}
.spot__btn::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(var(--ink), var(--ink)) center / 12px 1.5px no-repeat,
		linear-gradient(var(--ink), var(--ink)) center / 1.5px 12px no-repeat;
	transition: transform .35s var(--ease-out);
}
.spot__btn::after { content: ""; position: absolute; inset: -6px; border: 1.5px solid rgba(251, 248, 243, .9); border-radius: 50%; animation: xan-pulse 2.4s var(--ease-out) infinite; }
.spot__btn:hover { transform: scale(1.1); }
.spot__btn[aria-expanded="true"]::before { transform: rotate(45deg); }
.spot__btn[aria-expanded="true"]::after { animation: none; opacity: 0; }
.spot__card {
	position: absolute;
	left: 26px;
	top: -18px;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 12px;
	width: 260px;
	padding: 12px;
	background: var(--surface);
	box-shadow: 0 24px 44px -20px rgba(0, 0, 0, .45);
	animation: xan-fade-up .35s var(--ease-out) both;
}
.spot__card[hidden] { display: none; }
.spot.is-left .spot__card { left: auto; right: 26px; }
.spot.is-up .spot__card { top: auto; bottom: -18px; }
.spot__img img { width: 60px; height: 60px; object-fit: cover; background: var(--clay); }
.spot__body { display: flex; flex-direction: column; gap: 3px; grid-column: auto; min-width: 0; font-size: 13px; line-height: 1.4; }
.spot__card > .spot__body:first-child { grid-column: 1 / -1; }
.spot__body b { font-size: 14px; font-weight: 600; }
.spot__body > span { color: var(--ink-2); }
.spot__body em { font-style: normal; font-weight: 500; }
.spot__body .link { margin-top: 4px; font-size: 13px; }
@keyframes xan-pulse { 0% { transform: scale(.8); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }

.shoppable__lead { max-width: 30em; color: var(--ink-2); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; margin: 36px 0 0; }
.stats__item { padding-top: 14px; border-top: 1px solid var(--ink); }
.stats dt { font-family: var(--serif-d); font-size: clamp(2.6rem, 5vw, 4.2rem); line-height: 1; font-variant-numeric: tabular-nums; }
.stats dd { margin: 8px 0 0; font-size: 14px; color: var(--ink-2); }
@media (max-width: 860px) {
	.shoppable__grid { grid-template-columns: 1fr; }
	.spot__card { width: 210px; }
}
