/* ==========================================================================
   Mil Suspiros · Sección 5 · Concepto · y Sección 6 · Apartados
   --------------------------------------------------------------------------
   El pergamino del concepto cubre la Sección 6. concept.js fija ambas en
   pantalla y, con el scroll, recorta la hoja de derecha a izquierda mientras
   el rollo (cilindro de papel) avanza por el borde.
   ========================================================================== */

.ans-ms-reveal {
	position: relative;
}

/* Sección 6: fondo de puntos. */
.ans-ms-boards,
.ans-ms-bio {
	background-color: #fff;
	background-image: var(--ms-dots);
	background-size: cover;
	background-position: center;
}

.ans-mspage .ans-ms-boards__list {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 3.2vw;
	height: 100%;
	padding: 0 var(--ms-pad) 0;
	padding-bottom: calc(var(--ms-h) * 0.29);
}

.ans-ms-boards__item {
	flex: 0 1 20vw;
	max-width: 20vw;
}

.ans-mspage .ans-ms-boards__card,
.ans-mspage .ans-ms-boards__card:hover,
.ans-mspage .ans-ms-boards__card:focus {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.6vw;
	width: 100%;
	color: #000;
	background: none;
}

.ans-ms-boards__thumb {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	--th: min(27vh, 15vw);

	width: 100%;
	height: var(--th);
	transition: transform 0.55s var(--ans-ease);
	transform-origin: 50% 100%;
}

.ans-ms-boards__crop {
	position: relative;
	display: block;
	width: min(100%, var(--th) * var(--vr));
	aspect-ratio: var(--vr);
}

.ans-mspage .ans-ms-boards__img {
	position: absolute;
	left: calc(var(--ox) * -100%);
	top: calc(var(--oy) * -100%);
	width: calc(var(--sx) * 100%);
	height: calc(var(--sy) * 100%);
	max-width: none;
}

.ans-ms-boards__label {
	font-family: var(--ans-font-sans);
	font-weight: 600;
	font-size: var(--ans-text-sm);
	line-height: 1.2;
	letter-spacing: var(--ans-tracking);
	text-transform: uppercase;
	text-align: center;
	transition: transform 0.55s var(--ans-ease);
}

/* Al pasar el cursor, la imagen crece un poco más que las demás. */
.ans-ms-boards__card:hover .ans-ms-boards__thumb,
.ans-ms-boards__card:focus-visible .ans-ms-boards__thumb {
	transform: scale(1.12);
}

.ans-ms-boards__card:hover .ans-ms-boards__label,
.ans-ms-boards__card:focus-visible .ans-ms-boards__label {
	transform: translateY(0.5vw);
}

/* --------------------------------------------------------------------------
   Sección 5 · Concepto
   -------------------------------------------------------------------------- */

.ans-ms-concept {
	position: absolute;
	inset: 0;
	z-index: 8;
	pointer-events: none;
}

.ans-ms-concept__sheet {
	position: absolute;
	inset: 0;
	pointer-events: auto;
	clip-path: inset(0 var(--cut, 0%) 0 0);
}

.ans-ms-reveal.is-open .ans-ms-concept__sheet {
	pointer-events: none;
}

.ans-ms-concept__body {
	position: absolute;
	left: 50%;
	top: 50%;
	width: min(68vw, 1180px);
	max-height: 72%;
	overflow: hidden;
	transform: translate(-50%, -50%);
	font-size: var(--ms-text);
	text-align: center;
}

.ans-ms-concept__text {
	font-size: inherit;
	line-height: 1.6;
	letter-spacing: var(--ans-tracking);
	color: #000;
}

.ans-ms-concept__text + .ans-ms-concept__text {
	margin-top: 1.3em;
}

/* Rollo: cilindro de pergamino en el borde de la hoja. */
.ans-ms-concept__roll {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: var(--roll-w, 0px);
	visibility: hidden;
	background:
		linear-gradient(90deg, rgba(0, 0, 0, 0.26), rgba(255, 255, 255, 0.55) 34%, rgba(255, 255, 255, 0.2) 52%, rgba(0, 0, 0, 0.16) 78%, rgba(0, 0, 0, 0.32)),
		url("../../img/parchment.webp") 0 0 / 760px 760px,
		rgba(226, 224, 221, 0.96);
	box-shadow: 10px 0 18px -6px rgba(0, 0, 0, 0.28), -4px 0 10px -6px rgba(0, 0, 0, 0.2);
	border-radius: 999px / 14px;
	will-change: transform;
}

/* --------------------------------------------------------------------------
   Ventanas (6.1 – 6.4)
   -------------------------------------------------------------------------- */

.ans-ms-win {
	position: absolute;
	inset: 0;
	z-index: 12;
	display: grid;
	place-items: center;
	padding: 4vh 4vw;
}

.ans-ms-win[hidden] {
	display: none;
}

.ans-ms-win__panel {
	position: relative;
	width: min(84vw, calc(var(--ms-h) * 0.84 * 1.81));
	aspect-ratio: 1.81;
	overflow: hidden;
	color: var(--ms-brown);
	/* Fondo con transparencia: se adivina la sección debajo. */
	background: rgba(225, 220, 217, 0.92);
	border-radius: clamp(18px, 2vw, 36px);
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.ans-ms-win__panel--dark {
	color: var(--ms-cream);
	background: rgba(0, 0, 0, 0.92);
}

.ans-ms-win__panel--textile {
	color: #000;
}

.ans-ms-win__title {
	position: absolute;
	top: 6.5%;
	right: 3.2%;
	z-index: 2;
	margin: 0;
	font-family: var(--ans-font-sans);
	font-weight: 600;
	font-size: var(--ms-text);
	line-height: 1;
	letter-spacing: var(--ans-tracking);
	text-transform: uppercase;
	color: inherit;
}

/* 6.1 · Moodboard: sin márgenes; deja libre la franja derecha del título. */
.ans-ms-mood {
	position: absolute;
	/* La franja derecha queda libre para el título. */
	inset: 0 15% 0 0;
}

.ans-mspage .ans-ms-mood__img {
	width: 100%;
	height: 100%;
	max-width: none;
	/* Imagen completa, sin recortes. */
	object-fit: contain;
	object-position: left center;
}

/* 6.2 · Perfil de usuario. */
.ans-ms-user {
	display: grid;
	grid-template-columns: 40% minmax(0, 1fr);
	grid-template-rows: 100%;
	align-items: center;
	column-gap: 5%;
	height: 100%;
	padding: 6% 6% 6% 2%;
}

.ans-ms-user__collage {
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ans-mspage .ans-ms-user__img {
	max-height: 100%;
	max-width: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

.ans-ms-user__body {
	font-size: var(--ms-text);
	color: #000;
}

.ans-ms-user__text {
	font-size: 0.86em;
	line-height: 1.6;
	letter-spacing: var(--ans-tracking);
	text-align: left;
}

.ans-mspage .ans-ms-user__text + .ans-ms-user__text {
	margin-top: 1.3em;
}

.ans-mspage .ans-ms-user__values-title {
	margin-top: 2.6em;
	font-size: 0.86em;
	line-height: 1;
	letter-spacing: var(--ans-tracking);
	text-transform: uppercase;
	text-align: center;
	color: #000;
}

.ans-mspage .ans-ms-user__values {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1em 1.5em;
	max-width: 30em;
	margin: 1.3em auto 0;
}

.ans-ms-user__pill {
	padding: 0.75em 1.35em;
	font-size: 0.86em;
	line-height: 1;
	color: var(--ms-brown);
	background: var(--ms-pill);
	border-radius: 999px;
	box-shadow: 2px 3px 4px rgba(0, 0, 0, 0.28);
}

/* 6.3 · Paleta de color. */
.ans-mspage .ans-ms-palette {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 1.4%;
	height: 100%;
	padding: 11% 9% 4%;
}

.ans-ms-palette__item {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25em;
	font-size: var(--ms-text);
	color: var(--ms-brown);
	text-transform: uppercase;
	text-align: center;
	transition: transform 0.5s var(--ans-ease), opacity 0.5s var(--ans-ease);
	outline: none;
}

.ans-ms-palette__swatch {
	display: block;
	width: 100%;
	aspect-ratio: 0.53;
	margin-bottom: 0.6em;
	overflow: hidden;
}

.ans-mspage .ans-ms-palette__img {
	width: 192%;
	max-width: none;
	height: auto;
	margin-left: -46%;
	margin-top: -3%;
}

.ans-ms-palette__name {
	font-weight: 600;
	font-size: 0.8em;
	line-height: 1.2;
}

.ans-ms-palette__code {
	font-weight: 400;
	font-size: 0.8em;
	line-height: 1.2;
}

/* Al pasar el cursor por un color: crece con su texto y solo entonces los
   demás se opacan. Sin cursor sobre ningún color, todos se ven claros. */
.ans-ms-palette:has(.ans-ms-palette__item:hover) .ans-ms-palette__item,
.ans-ms-palette:has(.ans-ms-palette__item:focus-visible) .ans-ms-palette__item {
	opacity: 0.4;
}

.ans-ms-palette .ans-ms-palette__item:hover,
.ans-ms-palette .ans-ms-palette__item:focus-visible,
.ans-ms-palette:has(.ans-ms-palette__item:hover) .ans-ms-palette__item:hover,
.ans-ms-palette:has(.ans-ms-palette__item:focus-visible) .ans-ms-palette__item:focus-visible {
	opacity: 1;
	transform: scale(1.08);
}

/* --------------------------------------------------------------------------
   Móvil
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
	.ans-mspage .ans-ms-boards__list {
		flex-wrap: wrap;
		align-items: flex-end;
		align-content: center;
		row-gap: 7vh;
		column-gap: 6vw;
		padding: 64px 20px 20px;
	}

	.ans-ms-boards__item {
		flex: 0 0 40vw;
		max-width: 40vw;
	}

	.ans-mspage .ans-ms-boards__card {
		gap: 12px;
	}

	.ans-ms-boards__thumb {
		--th: 18vh;
	}

	.ans-ms-concept__body {
		width: calc(100vw - 40px);
		max-height: 80%;
	}

	.ans-ms-win {
		padding: 72px 12px 16px;
	}

	.ans-ms-win__panel {
		width: 100%;
		max-height: 100%;
		aspect-ratio: auto;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.ans-ms-win__title {
		position: sticky;
		top: 0;
		right: auto;
		display: block;
		padding: 20px 20px 0;
		text-align: right;
	}

	.ans-ms-mood {
		position: relative;
		inset: auto;
		padding-top: 16px;
	}

	.ans-mspage .ans-ms-mood__img {
		width: 100%;
		height: auto;
		max-width: none;
	}

	.ans-ms-user {
		grid-template-columns: 1fr;
		grid-template-rows: auto;
		row-gap: 20px;
		height: auto;
		padding: 16px 20px 28px;
	}

	.ans-ms-user__collage {
		height: auto;
	}

	.ans-mspage .ans-ms-user__img {
		width: 72%;
	}

	.ans-mspage .ans-ms-palette {
		flex-wrap: wrap;
		height: auto;
		row-gap: 20px;
		padding: 20px 16px 28px;
	}

	.ans-ms-palette__item {
		flex: 0 0 30%;
	}

	.ans-ms-win__panel--textile {
		min-height: 60vh;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ans-ms-boards__thumb,
	.ans-ms-boards__label,
	.ans-ms-palette__item {
		transition: none;
	}
}

/* --------------------------------------------------------------------------
   Carta textil (Mil Suspiros, Vulnus, Ramé): foto de cada tela con su
   nombre y composición, en Inter Tight y con el color de las demás ventanas.
   -------------------------------------------------------------------------- */

.ans-mspage .ans-textile {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 3%;
	height: 100%;
	padding: 11% 6% 5%;
	container-type: size;
}

.ans-textile__item {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3em;
	font-size: var(--ms-text);
	color: var(--ms-brown);
	text-align: center;
}

.ans-textile__photo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 54cqh;
	margin-bottom: 0.8em;
}

.ans-mspage .ans-textile__img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

.ans-textile__role {
	font-weight: 400;
	font-size: 0.72em;
	line-height: 1.2;
	letter-spacing: var(--ans-tracking);
	text-transform: uppercase;
	opacity: 0.75;
}

.ans-textile__name {
	font-weight: 600;
	font-size: 0.8em;
	line-height: 1.25;
	letter-spacing: var(--ans-tracking);
	text-transform: uppercase;
}

.ans-textile__line {
	font-weight: 400;
	font-size: 0.78em;
	line-height: 1.35;
}

@media (max-width: 767px) {
	.ans-mspage .ans-textile {
		flex-wrap: wrap;
		height: auto;
		row-gap: 24px;
		padding: 20px 16px 28px;
		container-type: normal;
	}

	.ans-textile__item {
		flex: 0 0 47%;
	}

	.ans-textile__photo {
		height: 26vh;
	}
}
