/*
 * SIVE: componentes propios de la página ([jc_sive tipo="…"]). Se carga después de jardin.css, que pone la
 * base de .jgm (figura, pie, índice, ficha y cuerda de capítulos): aquí solo va lo que el Jardín no tiene.
 * Esquinas rectas y líneas de 1 px. Cada regla lleva .jgm o .jsv delante para ganar a los selectores de
 * etiqueta de WoodMart, que se carga después.
 */

/* ------------------------------------------------------------------ cabecera */

body.jc-obra--sive .e-con.jc-hero {
	--padding-left: 0px;
	--padding-right: 0px;
	position: relative;
	background-color: #000;
}

body.jc-obra--sive .jc-hero > .elementor-widget-shortcode {
	position: absolute;
	inset: 0;
	width: 100%;
	max-width: none;
	margin: 0;
}

body.jc-obra--sive .jc-hero :is(.elementor-widget-container, .elementor-shortcode) {
	height: 100%;
}

.jgm.jsv-hero {
	position: relative;
	height: 100%;
	overflow: hidden;
}

.jgm.jsv-hero::after {
	content: "";
	position: absolute;
	inset: auto 0 0;
	height: 38%;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #000);
	pointer-events: none;
}

/* ------------------------------------------------------------------ numeración común */

.jgm .jsv-n {
	flex: none;
	color: var(--jgm-accent);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .14em;
	font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ fotos */

.jgm.jsv-photos {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: clamp(14px, 2vw, 28px);
}

.jsv-photos__item {
	margin: 0;
	grid-column: span 6;
}

.jsv-photos__item--1 { grid-column: span 7; }
.jsv-photos__item--2 { grid-column: span 5; align-self: end; }
.jsv-photos__item--3 { grid-column: span 4; }
.jsv-photos__item--4 { grid-column: span 8; }

.jgm .jsv-photos__img {
	overflow: hidden;
	border: 1px solid var(--jgm-line);
	background: #050505;
}

.jgm .jsv-photos__img img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

.jgm .jsv-photos__item--3 .jsv-photos__img img { aspect-ratio: 1; }

.jgm .jsv-photos__item figcaption,
.jgm.jsv-demo figcaption {
	display: flex;
	gap: 12px;
	margin-top: 10px;
	color: var(--jgm-muted);
	font-size: 13px;
	line-height: 1.5;
	text-align: left;
}

.jgm .jsv-credit {
	display: block;
	margin-top: 2px;
	font-size: 11.5px;
	opacity: .8;
}

.jgm .jsv-credit a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: .18em;
}

/* ------------------------------------------------------------------ cifras */

.jgm.jsv-facts {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	margin: 0;
	border-top: 1px solid var(--jgm-line);
}

.jgm .jsv-facts__item {
	padding: 22px 22px 0 0;
}

.jgm .jsv-facts__item + .jsv-facts__item {
	padding-left: 22px;
	border-left: 1px solid var(--jgm-line);
}

.jgm.jsv-facts dt {
	color: #fff;
	font-family: Montserrat, sans-serif;
	font-size: clamp(38px, 4vw, 64px);
	font-weight: 100;
	line-height: 1;
}

.jgm.jsv-facts dd {
	margin: 10px 0 0;
	color: var(--jgm-muted);
	font-size: 13px;
	line-height: 1.5;
}

/* ------------------------------------------------------------------ método */

.jgm.jsv-steps {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
	border-top: 1px solid var(--jgm-line);
}

.jgm .jsv-steps__item {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 22px 22px 6px 0;
}

.jgm .jsv-steps__item + .jsv-steps__item {
	padding-left: 22px;
	border-left: 1px solid var(--jgm-line);
}

.jgm .jsv-steps__t {
	color: #fff;
	font-size: 18px;
	font-weight: 600;
}

.jgm .jsv-steps__d {
	color: var(--jgm-muted);
	font-size: 13.5px;
	line-height: 1.55;
}

/* ------------------------------------------------------------------ demo y charla */

.jgm.jsv-demo {
	margin: 0;
}

.jgm .jsv-demo__media {
	border: 1px solid var(--jgm-line);
	background: #050505;
}

.jgm .jsv-demo__media video {
	display: block;
	width: 100%;
	height: auto;
	max-height: 82vh;
}

.jgm.jsv-video {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border: 1px solid var(--jgm-line);
	background: #050505;
}

.jgm.jsv-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.jgm.jsv-vlink {
	margin: 12px 0 0;
	font-size: 13px;
}

.jgm.jsv-vlink a {
	color: var(--jgm-accent);
	text-underline-offset: .2em;
}

/* ------------------------------------------------------------------ llamada a la app */

.jgm.jsv-cta {
	position: relative;
	display: grid;
	grid-template-columns: minmax(160px, 260px) 1fr;
	align-items: center;
	gap: clamp(22px, 4vw, 56px);
	padding: clamp(24px, 4vw, 52px);
	overflow: hidden;
	border: 1px solid var(--jgm-accent);
	background: radial-gradient(120% 140% at 0% 50%, rgba(255, 140, 66, .12), rgba(0, 0, 0, 0) 60%), #050505;
}

/* Un radar dibujado con CSS: anillos y un barrido que gira. */
.jsv-cta__radar {
	position: relative;
	aspect-ratio: 1;
	border-radius: 50%;
	background:
		repeating-radial-gradient(circle, rgba(255, 255, 255, 0) 0 18%, rgba(255, 255, 255, .12) 18% calc(18% + 1px)),
		linear-gradient(rgba(255, 255, 255, .1), rgba(255, 255, 255, .1)) 50% 0 / 1px 100% no-repeat,
		linear-gradient(rgba(255, 255, 255, .1), rgba(255, 255, 255, .1)) 0 50% / 100% 1px no-repeat;
	border: 1px solid rgba(255, 255, 255, .2);
	overflow: hidden;
}

.jsv-cta__radar::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: conic-gradient(from 0deg, rgba(255, 140, 66, 0) 0 300deg, rgba(255, 140, 66, .55) 360deg);
	animation: jsv-sweep 4s linear infinite;
}

.jsv-cta__radar::after {
	content: "";
	position: absolute;
	top: 34%;
	left: 62%;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #ffb07a;
	box-shadow: 0 0 10px #ff8c42;
	animation: jsv-echo 4s linear infinite;
}

@keyframes jsv-sweep { to { transform: rotate(360deg); } }
@keyframes jsv-echo { 0%, 8% { opacity: 1; } 60%, 100% { opacity: .1; } }

@media (prefers-reduced-motion: reduce) {
	.jsv-cta__radar::before,
	.jsv-cta__radar::after { animation: none; }
}

.jgm .jsv-cta__k {
	margin: 0 0 10px;
	color: var(--jgm-accent);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
}

.jgm .jsv-cta__h {
	margin: 0 0 12px;
	color: #fff;
	font-family: Montserrat, sans-serif;
	font-size: clamp(24px, 2.2vw + 10px, 40px);
	font-weight: 600;
	line-height: 1.15;
	text-align: left;
}

.jgm .jsv-cta__d {
	max-width: 52ch;
	margin: 0 0 22px;
	color: var(--jgm-text);
	font-size: 15px;
	line-height: 1.6;
	text-align: left;
	hyphens: manual;
}

.jgm .jsv-cta__go {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
}

.jgm a.jsv-btn {
	display: inline-flex;
	align-items: center;
	min-height: 46px;
	padding: 10px 22px;
	border: 1px solid var(--jgm-accent);
	background: var(--jgm-accent);
	color: #120b02;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .02em;
	text-decoration: none;
	transition: background-color .25s ease, color .25s ease;
}

.jgm a.jsv-btn:is(:hover, :focus-visible) {
	background: transparent;
	color: #fff;
}

.jgm a.jsv-btn--ghost {
	background: transparent;
	color: var(--jgm-accent);
}

.jgm a.jsv-btn--ghost:is(:hover, :focus-visible) {
	background: var(--jgm-accent);
	color: #120b02;
}

/* Sin el vídeo de demostración (assets/sive/sive-demo.mp4), su bloque queda vacío: no ocupa sitio. */
body.jc-obra--sive .e-con.jc-escena:not(:has(.jgm)) {
	display: none;
}

/* ------------------------------------------------------------------ anclas del índice */

body.jc-obra--sive .e-con[id] {
	scroll-margin-top: 96px;
}

@media (prefers-reduced-motion: no-preference) {
	html:has(body.jc-obra--sive) {
		scroll-behavior: smooth;
	}
}

/* ------------------------------------------------------------------ tableta y móvil */

@media (max-width: 1024px) {
	.jgm.jsv-facts,
	.jgm.jsv-steps {
		grid-template-columns: 1fr 1fr;
	}

	.jgm .jsv-facts__item:nth-child(3),
	.jgm .jsv-steps__item:nth-child(3) {
		padding-left: 0;
		border-left: 0;
	}

	.jgm .jsv-facts__item:nth-child(n + 3),
	.jgm .jsv-steps__item:nth-child(n + 3) {
		margin-top: 18px;
		border-top: 1px solid var(--jgm-line);
	}
}

@media (max-width: 767px) {
	.jsv-photos__item,
	.jsv-photos__item--1,
	.jsv-photos__item--2,
	.jsv-photos__item--3,
	.jsv-photos__item--4 {
		grid-column: 1 / -1;
	}

	.jgm .jsv-photos__item--3 .jsv-photos__img img { aspect-ratio: 3 / 2; }

	.jgm.jsv-steps {
		grid-template-columns: 1fr;
	}

	.jgm .jsv-steps__item + .jsv-steps__item {
		padding-left: 0;
		border-left: 0;
		border-top: 1px solid var(--jgm-line);
		margin-top: 0;
	}

	.jgm.jsv-cta {
		grid-template-columns: 1fr;
	}

	.jsv-cta__radar {
		width: 120px;
	}

	.jgm a.jsv-btn {
		flex: 1 1 100%;
		justify-content: center;
	}

	.jgm.jsv-video {
		aspect-ratio: 4 / 3;
	}
}
