/* =====================================================================
   PORTADA V2 - Miquel Silvestre
   Estilos aislados para index-boceto.php.
   Regla del proyecto: todas las clases llevan el prefijo v2_miquel_.
   Identidad heredada de css/style.css: tipografia Signika,
   tinta #434A54, pizarra #5E6D81, fondos #F9FAFC / #F4F4F6 y
   acento amarillo #FFD205 (tema .yellow existente).
   ===================================================================== */

.v2_miquel_hero,
.v2_miquel_bio,
.v2_miquel_cta_section {
	--v2-miquel-ink: #434A54;
	--v2-miquel-slate: #5E6D81;
	--v2-miquel-text: #59626e;      /* texto de lectura: contraste >= 5.5:1 sobre los fondos */
	--v2-miquel-muted: #6f7884;
	--v2-miquel-paper: #F9FAFC;
	--v2-miquel-paper-2: #F4F4F6;
	--v2-miquel-line: #EBEEF2;
	--v2-miquel-accent: #FFD205;
	--v2-miquel-accent-dark: #e6bc00;
	--v2-miquel-radius: 4px;
	--v2-miquel-gutter: 16px;

	/* Las secciones heredadas flotan: esta se integra en el mismo flujo */
	float: left;
	clear: both;
	width: 100%;
	font-family: 'Signika', sans-serif;
	color: var(--v2-miquel-text);
	font-weight: 300;
	-webkit-text-size-adjust: 100%;
}

.v2_miquel_hero *,
.v2_miquel_bio *,
.v2_miquel_cta_section * {
	box-sizing: border-box;
}

/* Enlaces y botones: foco siempre visible */
.v2_miquel_hero a:focus-visible,
.v2_miquel_hero button:focus-visible,
.v2_miquel_bio a:focus-visible,
.v2_miquel_cta_section a:focus-visible,
.v2_miquel_carousel_track:focus-visible {
	outline: 3px solid var(--v2-miquel-ink);
	outline-offset: 3px;
}

/* ---------------------------------------------------------------------
   HERO: triptico de tres columnas de igual ancho y altura
   [foto entrenamiento] [nombre + presentacion] [foto moto]
   La columna central lleva el carrusel de fotos como fondo.
   El lema "Dos formas de no parar" y el CTA van en .v2_miquel_cta_section.
   Mobile-first: identidad a todo el ancho -> dos fotos en paralelo -> CTA
   --------------------------------------------------------------------- */
.v2_miquel_hero {
	background-color: var(--v2-miquel-paper);
	border-bottom: 1px solid var(--v2-miquel-line);
	padding: 0; /* sin espacio bajo el triptico */
	overflow: hidden; /* evita cualquier desbordamiento horizontal de las fotos */
}

.v2_miquel_hero_inner {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-template-areas:
		"head head"
		"fit  moto";
	gap: 0;
	align-items: stretch;
	max-width: none;
	margin: 0;
	padding: 0; /* el triptico ocupa el 100% del ancho de pantalla */
}

.v2_miquel_hero_head { grid-area: head; }
.v2_miquel_figure_fitness { grid-area: fit; }
/* La foto izquierda va envuelta en un enlace: el enlace ocupa la celda
   de la rejilla y la figura lo rellena entero */
.v2_miquel_hero_inner > a {
	grid-area: fit;
	display: flex;
	flex-direction: column;
	min-width: 0;
	color: inherit;
	text-decoration: none;
}
.v2_miquel_hero_inner > a > .v2_miquel_figure {
	flex: 1 1 auto;
}
.v2_miquel_figure_moto { grid-area: moto; }

/* Columna central: identidad sobre el carrusel de fondo -------------- */
.v2_miquel_hero_head {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: clamp(340px, 100vw, 480px);
	padding: 40px 20px 92px; /* espacio inferior reservado a las flechas */
	overflow: hidden;
	background-color: var(--v2-miquel-ink);
	text-align: center;
	isolation: isolate;
}

.v2_miquel_hero_content {
	position: relative;
	z-index: 2;
	width: 100%;
	/* Sombra corta (contorno) + difusa (halo): texto legible con el velo ligero */
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65), 0 2px 20px rgba(0, 0, 0, 0.55);
}

/* Nombre en una sola linea: el tamano se ajusta al ancho de la columna */
.v2_miquel_name {
	margin: 0;
	padding: 0;
	font-family: 'Signika', sans-serif;
	font-weight: 700;
	font-size: clamp(1.45rem, 9vw, 3rem);
	line-height: 1;
	letter-spacing: 0.01em;
	color: #fff;
	text-transform: uppercase;
	white-space: nowrap;
}

/* Barra amarilla bajo el nombre (mismo acento que el tema .yellow) */
.v2_miquel_name::after {
	content: "";
	display: block;
	width: 64px;
	height: 4px;
	margin: 18px auto 0;
	background-color: var(--v2-miquel-accent);
}

.v2_miquel_tagline {
	max-width: 30ch;
	margin: 18px auto 0;
	padding: 0;
	font-family: 'Signika', sans-serif;
	font-size: clamp(1rem, 4.2vw, 1.25rem);
	font-weight: 400;
	line-height: 1.4;
	color: #fff;
}

/* Oferta bajo el subtitulo: segunda barra amarilla, texto y boton ---- */
.v2_miquel_hero_offer {
	max-width: 32ch;
	margin: 0 auto;
	padding: 0;
}

/* Misma barra y mismo espaciado que la del nombre */
.v2_miquel_hero_offer::before {
	content: "";
	display: block;
	width: 64px;
	height: 4px;
	margin: 18px auto 0;
	background-color: var(--v2-miquel-accent);
}

.v2_miquel_hero_offer_text {
	margin: 18px 0 0;
	padding: 0;
	font-family: 'Signika', sans-serif;
	font-size: clamp(0.95rem, 3.8vw, 1.1rem);
	font-weight: 300;
	line-height: 1.45;
	color: #fff;
}

.v2_miquel_hero_offer_btn {
	margin-top: 16px;
	text-shadow: none;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.v2_miquel_hero_offer_btn:focus-visible {
	outline-color: #fff;
}

/* Texto solo para lectores de pantalla */
.v2_miquel_sr_only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Fotografias verticales con texto superpuesto ---------------------- */
.v2_miquel_figure {
	position: relative;
	min-width: 0;
	margin: 0;
	padding: 0;
}

.v2_miquel_figure_media {
	position: relative;
	height: 100%;
	overflow: hidden;
	background-color: var(--v2-miquel-ink);
	aspect-ratio: 3 / 4;
}

.v2_miquel_figure_img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Degradado inferior: garantiza la lectura del texto sin apagar la foto */
.v2_miquel_figure_media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top,
		rgba(30, 34, 40, 0.92) 0%,
		rgba(30, 34, 40, 0.6) 26%,
		rgba(30, 34, 40, 0) 55%);
	pointer-events: none;
}

.v2_miquel_figure:hover .v2_miquel_figure_img {
	transform: scale(1.03);
}

.v2_miquel_figure_caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	margin: 0;
	padding: 0 14px 16px;
	font-family: 'Signika', sans-serif;
	color: #fff;
	text-shadow: 0 1px 14px rgba(0, 0, 0, 0.35);
}

.v2_miquel_figure_caption::before {
	content: "";
	display: block;
	width: 32px;
	height: 4px;
	margin-bottom: 10px;
	background-color: var(--v2-miquel-accent);
}

.v2_miquel_caption_big {
	display: block;
	font-size: clamp(1.15rem, 5.6vw, 1.9rem);
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	color: #fff;
}

.v2_miquel_caption_small {
	display: block;
	margin-top: 6px;
	font-size: clamp(0.8rem, 3.5vw, 1.1rem);
	font-weight: 300;
	line-height: 1.3;
	color: #f1f3f5;
}

/* ---------------------------------------------------------------------
   CARRUSEL DE FONDO (columna central): fundido en bucle cada 5 s
   --------------------------------------------------------------------- */
.v2_miquel_carousel {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.v2_miquel_carousel_track {
	position: absolute;
	inset: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.v2_miquel_carousel_slide {
	position: absolute;
	inset: 0;
	margin: 0;
	padding: 0;
	opacity: 0;
	transition: opacity 1.2s ease;
}

.v2_miquel_carousel_slide_active {
	opacity: 1;
}

.v2_miquel_carousel_picture {
	display: block;
	width: 100%;
	height: 100%;
}

.v2_miquel_carousel_img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* Velo ligero: la foto se ve con su luz y solo se oscurece un halo suave
   detras del texto central y la base donde estan las flechas */
.v2_miquel_carousel::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background:
		radial-gradient(ellipse 95% 48% at 50% 48%, rgba(20, 23, 28, 0.5) 0%, rgba(20, 23, 28, 0.28) 50%, rgba(20, 23, 28, 0) 100%),
		linear-gradient(to bottom, rgba(20, 23, 28, 0.12) 0%, rgba(20, 23, 28, 0.06) 60%, rgba(20, 23, 28, 0.4) 100%);
	pointer-events: none;
}

/* Flechas: unico control visible. Ocultas sin JS */
.v2_miquel_carousel_controls {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 24px;
	z-index: 3;
	display: none;
	justify-content: center;
	gap: 14px;
}

.v2_miquel_carousel_ready .v2_miquel_carousel_controls {
	display: flex;
}

.v2_miquel_carousel_btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 50%;
	background-color: rgba(30, 34, 40, 0.35);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.v2_miquel_carousel_btn:hover {
	background-color: var(--v2-miquel-accent);
	border-color: var(--v2-miquel-accent);
	color: var(--v2-miquel-ink);
}

.v2_miquel_carousel_btn:focus-visible {
	outline-color: #fff;
}

.v2_miquel_carousel_btn svg {
	width: 18px;
	height: 18px;
}

/* Boton principal (CTA) --------------------------------------------- */
.v2_miquel_btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	min-height: 48px;
	margin-top: 18px;
	padding: 12px 28px;
	border: 2px solid var(--v2-miquel-accent);
	border-radius: 2px;
	background-color: var(--v2-miquel-accent);
	color: var(--v2-miquel-ink);
	font-family: 'Signika', sans-serif;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.2;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.v2_miquel_btn:hover {
	background-color: #fff;
	border-color: #fff;
	color: var(--v2-miquel-ink);
}

.v2_miquel_btn:active {
	transform: translateY(1px);
}

.v2_miquel_cta .v2_miquel_btn:focus-visible {
	outline-color: #fff;
}

/* ---------------------------------------------------------------------
   BIOGRAFIA editorial + segundo CTA
   --------------------------------------------------------------------- */
.v2_miquel_bio {
	background-color: #fff;
	padding: 56px 0 64px;
}

.v2_miquel_bio_inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	row-gap: 32px;
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 var(--v2-miquel-gutter);
}

.v2_miquel_bio_aside {
	min-width: 0;
}

.v2_miquel_bio_title {
	margin: 0;
	padding: 0;
	font-family: 'Signika', sans-serif;
	font-size: clamp(1.5rem, 5vw, 2rem);
	font-weight: 600;
	line-height: 1.15;
	color: var(--v2-miquel-ink);
}

/* Cita destacada: repite una frase del texto, oculta a lectores de pantalla */
.v2_miquel_bio_quote {
	margin: 20px 0 0;
	padding: 4px 0 4px 18px;
	border: 0;
	border-left: 4px solid var(--v2-miquel-accent);
	background: none;
	font-family: 'Signika', sans-serif;
	font-style: normal;
	font-size: clamp(1.15rem, 3.8vw, 1.45rem);
	font-weight: 300;
	line-height: 1.4;
	color: var(--v2-miquel-slate);
}

.v2_miquel_bio_text {
	min-width: 0;
	max-width: 65ch;
}

.v2_miquel_bio_p {
	margin: 0 0 1.15em;
	padding: 0;
	font-family: 'Signika', sans-serif;
	font-size: 1.0625rem;
	font-weight: 300;
	line-height: 1.7;
	color: var(--v2-miquel-text);
}

.v2_miquel_bio_p:last-of-type {
	margin-bottom: 0;
}

.v2_miquel_bio_p strong {
	font-weight: 600;
	color: var(--v2-miquel-ink);
}

.v2_miquel_bio_lead {
	font-size: 1.2rem;
	line-height: 1.6;
	color: var(--v2-miquel-ink);
}

/* ---------------------------------------------------------------------
   Animacion de entrada: un unico momento orquestado al cargar
   --------------------------------------------------------------------- */
@keyframes v2_miquel_rise {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: none; }
}

.v2_miquel_hero_head,
.v2_miquel_figure {
	animation: v2_miquel_rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.v2_miquel_figure_fitness { animation-delay: 0.12s; }
.v2_miquel_figure_moto    { animation-delay: 0.22s; }

@media (prefers-reduced-motion: reduce) {
	.v2_miquel_hero_head,
	.v2_miquel_figure {
		animation: none;
	}
	.v2_miquel_btn,
	.v2_miquel_carousel_btn,
	.v2_miquel_carousel_slide {
		transition: none;
	}
}

/* ---------------------------------------------------------------------
   MOVIL GRANDE (>= 480px)
   --------------------------------------------------------------------- */
@media (min-width: 480px) {
	.v2_miquel_figure_caption {
		padding: 0 20px 22px;
	}
}

/* ---------------------------------------------------------------------
   TABLET Y ESCRITORIO (>= 768px): tres columnas de exactamente 1/3.
   La barra social fija (redes.css) aparece a partir de 751px en el
   borde izquierdo: se reserva margen para que no tape contenido.
   --------------------------------------------------------------------- */
@media (min-width: 768px) {
	.v2_miquel_hero,
	.v2_miquel_bio,
	.v2_miquel_cta_section {
		--v2-miquel-gutter: 64px;
	}
	.v2_miquel_hero_inner {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		grid-template-areas:
			"fit  head moto";
	}
	/* Altura comun de las tres columnas: proporcion 3:4 de un tercio de
	   pantalla, limitada para que la cabecera quepa en el viewport */
	/* Si el texto central necesita mas alto (tablet), la fila crece y las
	   fotos laterales se estiran con ella en lugar de cortar el contenido */
	.v2_miquel_figure {
		display: flex;
		flex-direction: column;
	}
	.v2_miquel_figure_media {
		flex: 1 1 auto;
		aspect-ratio: auto;
		height: auto;
		min-height: max(300px, min(44.44vw, calc(100vh - 140px), 900px));
	}
	/* El panel central se estira a la altura de las fotos (align-items: stretch) */
	.v2_miquel_hero_head {
		min-height: 0;
		padding: 24px clamp(14px, 1.8vw, 32px) 92px;
	}
	/* Tamanos ligados al ancho real de columna: 100vw / 3.
	   2.95vw mantiene "MIQUEL SILVESTRE" en una linea dentro del tercio */
	.v2_miquel_name {
		font-size: clamp(1.05rem, 2.95vw, 3.4rem);
	}
	.v2_miquel_name::after {
		margin-top: clamp(12px, 1.4vw, 22px);
	}
	.v2_miquel_tagline {
		margin-top: clamp(12px, 1.4vw, 22px);
		font-size: clamp(0.95rem, 1.15vw, 1.5rem);
	}
	.v2_miquel_hero_offer::before {
		margin-top: clamp(12px, 1.4vw, 22px);
	}
	.v2_miquel_hero_offer_text {
		margin-top: clamp(12px, 1.4vw, 22px);
		font-size: clamp(0.85rem, 0.95vw, 1.2rem);
	}
	.v2_miquel_hero_offer_btn {
		min-height: 44px;
		margin-top: clamp(12px, 1.2vw, 20px);
		padding: 10px clamp(14px, 1.6vw, 28px);
		font-size: clamp(0.8rem, 0.9vw, 1rem);
	}
	.v2_miquel_figure_caption {
		padding: 0 clamp(16px, 2.6vw, 48px) clamp(18px, 2.6vw, 48px);
	}
	/* La barra social fija (redes.css) ocupa el borde izquierdo */
	.v2_miquel_figure_fitness .v2_miquel_figure_caption {
		padding-left: max(64px, 2.6vw);
	}
	.v2_miquel_figure_caption::before {
		width: 40px;
		margin-bottom: clamp(10px, 1.2vw, 16px);
	}
	.v2_miquel_caption_big {
		font-size: clamp(1.3rem, 2.6vw, 3.1rem);
	}
	.v2_miquel_caption_small {
		margin-top: 8px;
		font-size: clamp(0.9rem, 1.15vw, 1.5rem);
	}
	.v2_miquel_bio {
		padding: 72px 0 80px;
	}
}

/* ---------------------------------------------------------------------
   DESKTOP (>= 1100px)
   --------------------------------------------------------------------- */
@media (min-width: 1100px) {
	.v2_miquel_bio_inner {
		grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.5fr);
		column-gap: 72px;
		align-items: start;
	}
	.v2_miquel_bio_aside {
		position: sticky;
		top: 32px;
	}
}

/* ---------------------------------------------------------------------
   Movimiento reducido: sin zoom en las fotos
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.v2_miquel_figure_img {
		transition: none;
	}
	.v2_miquel_figure:hover .v2_miquel_figure_img {
		transform: none;
	}
}

/* =====================================================================
   SECCION "DOS FORMAS DE NO PARAR" + CTA
   Banda oscura a todo el ancho con fotografia velada de fondo: se
   diferencia claramente de la biografia (fondo blanco) que la precede.
   ===================================================================== */
.v2_miquel_cta_section {
	position: relative;
	padding: 64px 0 72px;
	color: #fff;
	background-color: #353b43;
	/* Foto existente del proyecto, muy velada: textura de viaje sin competir con el texto */
	background-image:
		linear-gradient(to bottom, rgba(36, 40, 46, 0.9) 0%, rgba(36, 40, 46, 0.82) 100%),
		url("../img/v2_miquel/v2_miquel_slide_horizonte_640.jpg");
	background-position: center, center 40%;
	background-size: cover, cover;
	background-repeat: no-repeat;
	border-top: 4px solid var(--v2-miquel-accent);
}

.v2_miquel_cta_inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	row-gap: 36px;
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 var(--v2-miquel-gutter);
}

/* Lema --------------------------------------------------------------- */
.v2_miquel_claim {
	margin: 0;
	padding: 0;
	max-width: none;
	text-align: left;
}

.v2_miquel_claim_title {
	margin: 0;
	padding: 0;
	font-family: 'Signika', sans-serif;
	font-size: clamp(2.1rem, 9vw, 3.9rem);
	font-weight: 700;
	line-height: 0.98;
	letter-spacing: 0.015em;
	color: #fff;
	max-width: 6.6em; /* corte natural: DOS FORMAS / DE NO PARAR */
}

.v2_miquel_claim_lede {
	margin: 20px 0 0;
	padding: 0 0 0 16px;
	border-left: 3px solid var(--v2-miquel-accent);
	font-family: 'Signika', sans-serif;
	font-size: clamp(1.1rem, 3.6vw, 1.4rem);
	font-weight: 300;
	line-height: 1.4;
	color: #e4e8ec;
}

/* Llamada a la accion: integrada, sin caja ---------------------------- */
.v2_miquel_cta {
	width: auto;
	max-width: 46ch;
	margin: 0;
	padding: 0;
	border-radius: 0;
	background: none;
	color: #fff;
	text-align: left;
}

.v2_miquel_cta_text {
	max-width: none;
	margin: 0;
	padding: 0;
	font-family: 'Signika', sans-serif;
	font-size: 1.1rem;
	font-weight: 300;
	line-height: 1.6;
	color: #e4e8ec;
}

.v2_miquel_cta_text strong {
	font-weight: 600;
	color: #fff;
}

.v2_miquel_cta .v2_miquel_btn {
	margin-top: 28px;
}

/* ---------------------------------------------------------------------
   TABLET (>= 768px)
   --------------------------------------------------------------------- */
@media (min-width: 768px) {
	.v2_miquel_cta_section {
		padding: 88px 0 96px;
		background-image:
			linear-gradient(to right, rgba(36, 40, 46, 0.94) 0%, rgba(36, 40, 46, 0.86) 55%, rgba(36, 40, 46, 0.7) 100%),
			url("../img/v2_miquel/v2_miquel_slide_horizonte_1200.jpg");
	}
	.v2_miquel_cta_text {
		font-size: 1.15rem;
	}
}

/* ---------------------------------------------------------------------
   ESCRITORIO (>= 1000px): lema a la izquierda, CTA a la derecha,
   separados por una linea vertical fina
   --------------------------------------------------------------------- */
@media (min-width: 1000px) {
	.v2_miquel_cta_section {
		padding: 112px 0 120px;
	}
	.v2_miquel_cta_inner {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
		column-gap: 72px;
		align-items: center;
	}
	.v2_miquel_claim_title {
		font-size: clamp(3rem, 4.6vw, 4.4rem);
	}
	.v2_miquel_cta {
		padding-left: 56px;
		border-left: 1px solid rgba(255, 255, 255, 0.22);
	}
}
