/* ==========================================================================
   Home · Sección 2 · About me (tablero metálico)
   --------------------------------------------------------------------------
   Escritorio / horizontal: el contenido central vive en un "escenario" 16:9
   que se escala completo dentro de la pantalla (las medidas salen de la
   referencia y se expresan en cqw = 1 % del ancho del escenario).
   Los objetos se anclan a los bordes de la sección.
   Vertical (móvil / tablet vertical): el contenido se reorganiza en columna
   y los objetos ocupan franjas superior e inferior reservadas.
   ========================================================================== */

.ans-about {
	--ans-u: min(1vw, 1.7778vh); /* 1 % del ancho del escenario 16:9 */

	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 100%;
	min-height: 100vh;
	overflow: hidden;
	color: var(--ans-white);
	background: #9a9a98;
}

@supports (height: 100svh) {
	.ans-about {
		--ans-u: min(1vw, 1.7778svh);
		min-height: 100svh;
	}
}

.ans-about__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.ans-about__bg-img {
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	object-position: 50% 50%;
}

/* --------------------------------------------------------------------------
   Objetos (capas de profundidad)
   -------------------------------------------------------------------------- */

.ans-about__objects {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.ans-obj {
	position: absolute;
	left: var(--x);
	top: var(--y);
	width: calc(var(--w) * var(--ans-u));
	transform: translate(-50%, -50%) rotate(var(--r, 0deg));
	pointer-events: none;
}

.ans-obj__float,
.ans-obj__inner {
	position: relative;
	width: 100%;
}

.ans-obj__inner {
	pointer-events: auto;
	cursor: pointer;
	transform-origin: 50% 50%;
	-webkit-tap-highlight-color: transparent;
}

.ans-obj__img {
	width: 100%;
	height: auto;
}

/* Sombra según la capa: cuanto más cerca, más se separa del tablero. */
.ans-obj[data-depth="1"] { z-index: 1; }
.ans-obj[data-depth="2"] { z-index: 2; }
.ans-obj[data-depth="3"] { z-index: 3; }

.ans-obj[data-depth="1"] .ans-obj__img {
	filter: drop-shadow(0 calc(var(--ans-u) * 0.25) calc(var(--ans-u) * 0.35) rgba(0, 0, 0, 0.32));
}

.ans-obj[data-depth="2"] .ans-obj__img {
	filter: drop-shadow(0 calc(var(--ans-u) * 0.6) calc(var(--ans-u) * 0.8) rgba(0, 0, 0, 0.33));
}

.ans-obj[data-depth="3"] .ans-obj__img {
	filter: drop-shadow(0 calc(var(--ans-u) * 1.1) calc(var(--ans-u) * 1.5) rgba(0, 0, 0, 0.38));
}

/* Posiciones (escritorio). x / y = centro del objeto. w en unidades de escenario. */
.ans-obj--gafas     { --x: 10%;   --y: 14.5%; --w: 22;   --r: -11deg; }
.ans-obj--tijeras   { --x: 72.6%; --y: 5.5%;  --w: 10.4; --r: -84deg; }
.ans-obj--regla     { --x: 95%;   --y: 22%;   --w: 33;   --r: -67deg; }
.ans-obj--audifonos { --x: 91%;   --y: 77%;   --w: 30;   --r: 0deg; }
.ans-obj--metro     { --x: 49%;   --y: 93%;   --w: 11.6; --r: -88deg; }
.ans-obj--ipad      { --x: 7%;    --y: 83%;   --w: 20;   --r: 12deg; }

/* --------------------------------------------------------------------------
   Escenario y contenido
   -------------------------------------------------------------------------- */

.ans-about__stage {
	position: relative;
	z-index: 2;
	width: min(100vw, 177.78vh);
	aspect-ratio: 16 / 9;
	container-type: inline-size;
	pointer-events: none;
}

@supports (height: 100svh) {
	.ans-about__stage {
		width: min(100vw, 177.78svh);
	}
}

.ans-about__title {
	position: absolute;
	inset: 0;
	font-size: inherit;
	font-weight: inherit;
	line-height: 1;
	color: var(--ans-black);
}

.ans-about__hello {
	position: absolute;
	left: 25.4%;
	top: 6.6%;
	display: flex;
	align-items: baseline;
	gap: 1.8cqw;
	white-space: nowrap;
}

.ans-about__hello .ans-script {
	font-size: 6.6cqw;
	line-height: 1;
}

.ans-about__hello .ans-caps {
	font-size: 3.5cqw;
	line-height: 1;
	letter-spacing: 0.02em;
}

.ans-about__name {
	position: absolute;
	left: 40.3%;
	top: 18.6%;
	width: 44.6%;
}

.ans-about__name-img {
	width: 100%;
}

.ans-about__photo {
	position: absolute;
	left: 14.2%;
	top: 24.4%;
	width: 24.6%;
	aspect-ratio: 2 / 3;
	transform: rotate(-4deg);
	box-shadow: 0 1.2cqw 2.4cqw rgba(0, 0, 0, 0.35);
}

.ans-about__photo-img {
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	object-position: 50% 35%;
}

.ans-about__body {
	position: absolute;
	left: 44.7%;
	top: 47%;
	width: 36.4%;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.ans-about__text {
	width: 100%;
	font-family: var(--ans-font-sans);
	font-weight: 400;
	font-size: var(--ans-text);
	line-height: 1.5;
	color: #000;
}

/* Texto y botón en negro (#000). */
.ans-about__body .ans-btn,
.ans-about__body .ans-btn:visited {
	color: #000;
	border-color: #000;
}

.ans-about__body .ans-btn:hover,
.ans-about__body .ans-btn:focus-visible {
	color: #fff;
	background: #000;
}

.ans-about__body .ans-btn {
	margin-top: 4.4cqw;
	padding: 0.95cqw 2.3cqw;
	font-size: var(--ans-text-sm);
	border-width: max(2px, 0.22cqw);
	pointer-events: auto;
}

/* --------------------------------------------------------------------------
   Vertical: móvil y tablet en orientación vertical
   -------------------------------------------------------------------------- */

@media (max-aspect-ratio: 1/1) {
	.ans-about {
		--ans-u: 1vw;
		display: block;
		padding: 34vw 7vw 56vw;
	}

	.ans-about__stage {
		width: 100%;
		max-width: 640px;
		margin: 0 auto;
		aspect-ratio: auto;
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	.ans-about__title {
		position: relative;
		inset: auto;
		display: flex;
		flex-direction: column;
		align-items: center;
		width: 100%;
		order: 1;
	}

	.ans-about__hello {
		position: static;
		gap: 3cqw;
	}

	.ans-about__hello .ans-script {
		font-size: 13cqw;
	}

	.ans-about__hello .ans-caps {
		font-size: 7.4cqw;
	}

	.ans-about__name {
		position: static;
		width: 100%;
		margin-top: 2cqw;
	}

	.ans-about .ans-about__photo {
		position: relative;
		left: auto;
		top: auto;
		order: 2;
		width: 58%;
		margin: 13cqw 0 13cqw;
		box-shadow: 0 3cqw 6cqw rgba(0, 0, 0, 0.35);
	}

	.ans-about__body {
		position: static;
		order: 3;
		width: 100%;
	}

	.ans-about__text {
		line-height: 1.5;
	}

	.ans-about__body .ans-btn {
		margin-top: 9cqw;
		padding: 13px 30px;
		border-width: 2px;
	}

	/* Objetos: franja superior (y en vw) e inferior (desde el borde inferior). */
	.ans-obj--gafas     { --x: 17vw; --y: 13vw;               --w: 36; --r: -11deg; }
	.ans-obj--tijeras   { --x: 66vw; --y: 6vw;                --w: 13; --r: -84deg; }
	.ans-obj--regla     { --x: 97vw; --y: 15vw;               --w: 34; --r: -67deg; }
	.ans-obj--ipad      { --x: 9vw;  --y: calc(100% - 20vw);  --w: 30; --r: 12deg; }
	.ans-obj--metro     { --x: 47vw; --y: calc(100% - 7vw);   --w: 15; --r: -88deg; }
	.ans-obj--audifonos { --x: 85vw; --y: calc(100% - 17vw);  --w: 40; --r: 0deg; }
}

@media (max-aspect-ratio: 1/1) and (min-width: 768px) {
	.ans-about {
		padding: 26vw 12vw 40vw;
	}

	.ans-obj--gafas     { --w: 30; }
	.ans-obj--tijeras   { --w: 10; }
	.ans-obj--regla     { --w: 28; --y: 12vw; }
	.ans-obj--ipad      { --w: 24; --y: calc(100% - 16vw); }
	.ans-obj--metro     { --w: 11; --y: calc(100% - 6vw); }
	.ans-obj--audifonos { --w: 30; --y: calc(100% - 13vw); }
}
