/*
 * Innstante Silencioso · Núcleo — experiencia interactiva de la portada.
 * Respirar, modo silencio, ideas, «Soltarlo», carta al azar, cielo de textos,
 * «Hoy se sintió así», titular que conversa y resplandor por emoción.
 */

@property --innst-tinte {
	syntax: "<color>";
	inherits: true;
	initial-value: transparent;
}

:root {
	transition: --innst-tinte 1.4s ease;
}

/* Resplandor por emoción: úsalo en cualquier sección con la clase .innstante-resplandor.
 * El mismo dibujo se pinta en el menú (.ins-menu) y en la sección, alineados con
 * --innst-alto-menu, para que el color baje de corrido desde arriba de la página. */
:root {
	--innst-alto-resplandor: min(110vh, 1100px);
	--innst-resplandor:
		radial-gradient(ellipse 75% 55% at 50% -8%, color-mix(in srgb, var(--innst-tinte) 58%, transparent) 0%, transparent 72%),
		radial-gradient(ellipse 45% 35% at 85% 0%, color-mix(in srgb, var(--innst-tinte) 30%, transparent) 0%, transparent 70%);
}

html.noche {
	--innst-resplandor:
		radial-gradient(ellipse 75% 55% at 50% -8%, color-mix(in srgb, var(--innst-tinte) 34%, transparent) 0%, transparent 70%),
		radial-gradient(ellipse 45% 35% at 85% 0%, color-mix(in srgb, var(--innst-tinte) 18%, transparent) 0%, transparent 70%);
}

.innstante-resplandor {
	position: relative;
	isolation: isolate;
}

.innstante-resplandor::before {
	content: "";
	position: absolute;
	top: calc(var(--innst-alto-menu, 0px) * -1);
	left: 0;
	right: 0;
	height: var(--innst-alto-resplandor);
	pointer-events: none;
	z-index: -1;
	background: var(--innst-resplandor);
}

/* El menú se tiñe con el mismo resplandor (solo en páginas con la experiencia). */
html.innst-con-resplandor .ins-menu,
html.innst-con-resplandor .site-header {
	background-image: var(--innst-resplandor);
	background-size: 100% var(--innst-alto-resplandor);
	background-repeat: no-repeat;
	background-position: 0 0;
	transition: background-color 0.6s ease, border-color 0.6s ease;
}

html.innst-tenido .ins-menu,
html.innst-tenido .site-header {
	border-bottom-color: transparent;
}

/* El panel del menú en el móvil se tiñe igual que la barra. */
@media (max-width: 767px) {
	html.innst-con-resplandor .ins-menu__nav {
		background-image: var(--innst-resplandor);
		background-size: 100% var(--innst-alto-resplandor);
		background-repeat: no-repeat;
		background-position: 0 calc(var(--innst-alto-menu, 0px) * -1);
	}
}

/* ---------- Titular que conversa ---------- */

.innstante-rotador {
	transition: opacity 0.4s ease;
}

.innstante-rotador.is-fuera {
	opacity: 0;
}

.innstante-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- Hoy se sintió así ---------- */

.innstante-hoy {
	display: flex;
	align-items: center;
	gap: 16px;
	font-family: Poppins, system-ui, sans-serif;
	font-size: 13px;
	color: var(--ins-suave, #5e5953);
}

.innstante-hoy__barra {
	flex: 1;
	display: flex;
	height: 8px;
	border-radius: 999px;
	background: var(--ins-linea, #e7e4df);
}

.innstante-hoy__seg {
	position: relative;
	height: 100%;
	cursor: pointer;
	transition: filter 0.2s;
}

.innstante-hoy__seg:first-child {
	border-radius: 999px 0 0 999px;
}

.innstante-hoy__seg:last-child {
	border-radius: 0 999px 999px 0;
}

.innstante-hoy__seg:only-child {
	border-radius: 999px;
}

.innstante-hoy__seg:hover,
.innstante-hoy__seg:focus-visible {
	filter: brightness(1.12);
	outline: none;
}

.innstante-hoy__tip {
	position: absolute;
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%);
	background: #111;
	color: #fff;
	font-size: 12px;
	white-space: nowrap;
	padding: 6px 10px;
	border-radius: 8px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s;
	z-index: 5;
}

.innstante-hoy__seg:hover .innstante-hoy__tip,
.innstante-hoy__seg:focus-visible .innstante-hoy__tip {
	opacity: 1;
}

.innstante-hoy__titulo,
.innstante-hoy__total {
	white-space: nowrap;
}

@media (max-width: 767px) {
	.innstante-hoy {
		flex-wrap: wrap;
		gap: 8px;
	}

	.innstante-hoy__barra {
		flex-basis: 100%;
		order: 2;
	}
}

/* ---------- Ideas para empezar ---------- */

.innstante-ideas {
	display: grid;
	gap: 0.6rem;
}

.innstante-ideas > .innstante-enlace {
	justify-self: start;
	color: var(--innst-oscuro);
}

.innstante-idea {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	background: var(--ins-gris, #f1efeb);
	border-radius: 14px;
	padding: 0.85rem 1rem;
	font-family: var(--innst-lectura);
	font-style: italic;
	font-size: 1.05rem;
	line-height: 1.5;
	animation: innst-entra 0.35s ease;
}

.innstante-idea[hidden] {
	display: none;
}

.innstante-idea .innstante-boton-secundario {
	font-style: normal;
	font-size: 0.82rem;
	padding: 0.4rem 0.85rem;
	white-space: nowrap;
	flex-shrink: 0;
}

@keyframes innst-entra {
	from {
		opacity: 0;
		transform: translateY(6px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.innstante-enviar--interactivo {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

@media (max-width: 767px) {
	.innstante-idea {
		flex-direction: column;
		align-items: flex-start;
	}

	.innstante-enviar--interactivo {
		flex-direction: column-reverse;
		align-items: stretch;
	}

	.innstante-enviar--interactivo .innstante-enlace {
		align-self: center;
	}
}

/* ---------- Modo silencio ---------- */

.innstante-silencio {
	position: fixed;
	inset: 0;
	z-index: 99990;
	background: var(--ins-fondo, #faf9f6);
	overflow-y: auto;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 72px 16px 48px;
	opacity: 0;
	transition: opacity 0.5s ease;
}

.innstante-silencio.is-visible {
	opacity: 1;
}

.innstante-silencio__hoja {
	width: min(760px, 100%);
}

.innstante-silencio__salir {
	position: fixed;
	top: 16px;
	right: 16px;
	z-index: 99991;
	font-family: Poppins, system-ui, sans-serif;
	font-size: 13px;
	background: var(--ins-papel, #fff);
	color: var(--ins-texto, #111);
	border: 1px solid var(--ins-linea, #e7e4df);
	border-radius: 999px;
	padding: 8px 14px;
	cursor: pointer;
}

.innstante-silencio__rotulo {
	position: fixed;
	top: 24px;
	left: 50%;
	transform: translateX(-50%);
	font-family: Poppins, system-ui, sans-serif;
	font-size: 12px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ins-suave, #5e5953);
}

html.innstante-sin-scroll {
	overflow: hidden;
}

@media (max-width: 767px) {
	.innstante-silencio {
		padding-top: 64px;
	}

	.innstante-silencio__rotulo {
		display: none;
	}
}

/* ---------- Soltarlo: las letras se van ---------- */

.innstante-letra {
	position: fixed;
	z-index: 99999;
	font-family: Lora, Georgia, serif;
	font-size: 20px;
	color: var(--ins-texto, #111);
	pointer-events: none;
	will-change: transform, opacity;
	animation: innst-volar 1.8s cubic-bezier(0.25, 0.6, 0.3, 1) forwards;
}

@keyframes innst-volar {
	0% {
		opacity: 1;
		transform: translate(0, 0) rotate(0);
	}

	100% {
		opacity: 0;
		transform: translate(var(--dx), var(--dy)) rotate(var(--r));
		filter: blur(2px);
	}
}

.innstante-soltado {
	text-align: center;
	padding: 2.5rem 0.5rem;
	animation: innst-entra 0.5s ease;
}

.innstante-soltado__grande {
	font-family: Poppins, system-ui, sans-serif;
	font-weight: 500;
	font-size: 1.6rem;
	margin: 0 0 0.4rem;
}

.innstante-soltado p {
	margin: 0;
}

.innstante-soltado .innstante-ayuda {
	text-align: left;
}

.innstante-soltado__acciones {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 1.4rem;
}

.innstante-soltado__acciones > * {
	white-space: nowrap;
}

@media (max-width: 767px) {
	.innstante-soltado__acciones {
		flex-direction: column;
		align-items: stretch;
	}

	.innstante-soltado__acciones > * {
		justify-content: center;
		text-align: center;
	}
}

.innstante-entrada.is-nueva {
	animation: innst-nueva 1.2s ease;
}

@keyframes innst-nueva {
	0% {
		opacity: 0;
		transform: translateY(-14px) scale(0.98);
	}

	60% {
		opacity: 1;
		box-shadow: 0 0 0 6px rgba(17, 17, 17, 0.06);
	}

	100% {
		transform: none;
	}
}

/* ---------- Te leo: onda ---------- */

.innstante-te-leo {
	position: relative;
	overflow: visible;
}

.innstante-onda {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border-radius: 50%;
	border: 1.5px solid currentColor;
	pointer-events: none;
	animation: innst-onda 0.9s ease-out forwards;
}

@keyframes innst-onda {
	to {
		transform: scale(7);
		opacity: 0;
	}
}

/* ---------- Respirar ---------- */

.innstante-respira {
	position: fixed;
	inset: 0;
	z-index: 99995;
	background: var(--ins-fondo, #faf9f6);
	color: var(--ins-texto, #111);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 40px;
	animation: innst-entra 0.4s ease;
}

.innstante-respira__anillo {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	border: 3px solid currentColor;
	position: relative;
	transition: transform 4s ease-in-out;
}

.innstante-respira__anillo::after {
	content: "";
	position: absolute;
	inset: 38%;
	border-radius: 50%;
	background: currentColor;
}

.innstante-respira__anillo.is-dentro {
	transform: scale(2);
}

.innstante-respira__texto {
	font-family: Poppins, system-ui, sans-serif;
	font-size: 22px;
	font-weight: 500;
	min-height: 1.4em;
	margin: 0;
}

.innstante-respira__saltar {
	font-family: Poppins, system-ui, sans-serif;
	font-size: 14px;
	background: none;
	border: 0;
	text-decoration: underline;
	cursor: pointer;
	color: var(--ins-suave, #5e5953);
}

/* ---------- Carta al azar ---------- */

.innstante-azar {
	text-align: center;
}

.innstante-sobre {
	position: relative;
	width: min(520px, 100%);
	margin: 150px auto 0;
	height: 320px;
	perspective: 1200px;
	cursor: pointer;
}

.innstante-sobre:focus-visible {
	outline: 2px solid var(--ins-texto, #111);
	outline-offset: 8px;
	border-radius: 12px;
}

.innstante-sobre__cuerpo {
	position: absolute;
	inset: auto 0 0 0;
	height: 220px;
	background: #e6e3de;
	border-radius: 10px;
	z-index: 3;
	box-shadow: 0 30px 60px -30px rgba(46, 42, 38, 0.45);
}

.innstante-sobre__cuerpo::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 10px;
	background:
		linear-gradient(150deg, transparent 49.5%, rgba(0, 0, 0, 0.06) 50%) left / 50% 100% no-repeat,
		linear-gradient(210deg, transparent 49.5%, rgba(0, 0, 0, 0.06) 50%) right / 50% 100% no-repeat;
}

.innstante-sobre__tapa {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 120px;
	height: 120px;
	background: #dcd8d2;
	clip-path: polygon(0 0, 100% 0, 50% 100%);
	transform-origin: top;
	transform: translateY(120px) rotateX(0);
	z-index: 4;
	transition: transform 0.7s ease, z-index 0s 0.35s;
	border-radius: 10px 10px 0 0;
}

.innstante-sobre.is-abierto .innstante-sobre__tapa {
	transform: translateY(120px) rotateX(180deg);
	z-index: 1;
}

.innstante-sobre__sello {
	position: absolute;
	left: 50%;
	bottom: 150px;
	width: 46px;
	height: 46px;
	margin-left: -23px;
	border-radius: 50%;
	background: #2f3b34;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.3s;
}

.innstante-sobre__sello span {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid #eee8dc;
	background: radial-gradient(circle, #eee8dc 0 24%, transparent 26%);
}

.innstante-sobre.is-abierto .innstante-sobre__sello {
	opacity: 0;
}

.innstante-sobre__carta {
	position: absolute;
	left: 24px;
	right: 24px;
	bottom: 24px;
	height: 200px;
	background: var(--ins-papel, #fff);
	color: var(--ins-texto, #111);
	border-radius: 8px;
	z-index: 2;
	padding: 24px;
	text-align: left;
	overflow: auto;
	transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.35s, height 0.8s ease 0.35s;
	box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.3);
}

.innstante-sobre.is-abierto .innstante-sobre__carta {
	transform: translateY(-130px);
	height: 290px;
	z-index: 6;
}

.innstante-sobre__carta .innstante-firma {
	margin: 0 0 0.5rem;
}

.innstante-sobre__carta h3 {
	margin: 0 0 0.5rem;
	font-family: Poppins, system-ui, sans-serif;
	font-weight: 500;
	font-size: 1.2rem;
}

.innstante-sobre__carta p.innstante-cuerpo {
	margin: 0;
	font-family: Lora, Georgia, serif;
	font-size: 1.1rem;
	line-height: 1.7;
	white-space: pre-line;
	color: var(--ins-oscuro, #2e2a26);
}

.innstante-etiqueta-ejemplo {
	margin-left: auto;
	font-family: Poppins, system-ui, sans-serif;
	font-size: 10.5px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	background: var(--ins-gris, #f1efeb);
	color: var(--ins-suave, #5e5953);
	padding: 3px 8px;
	border-radius: 999px;
}

.innstante-azar__pista {
	font-family: Poppins, system-ui, sans-serif;
	font-size: 14px;
	color: var(--ins-suave, #5e5953);
	margin-top: 18px;
}

.innstante-azar.is-abierto .innstante-azar__pista {
	display: none;
}

.innstante-azar__acciones {
	display: none;
	justify-content: center;
	gap: 12px;
	margin-top: 28px;
	flex-wrap: wrap;
}

.innstante-azar.is-abierto .innstante-azar__acciones {
	display: flex;
	animation: innst-entra 0.4s ease 0.9s both;
}

.innstante-azar__acciones > * {
	white-space: nowrap;
}

@media (max-width: 767px) {
	.innstante-sobre {
		height: 300px;
		margin-top: 140px;
	}

	.innstante-sobre.is-abierto .innstante-sobre__carta {
		height: 270px;
		left: 14px;
		right: 14px;
	}

	.innstante-azar__acciones {
		flex-direction: column;
		align-items: stretch;
	}

	.innstante-azar__acciones > * {
		justify-content: center;
	}
}

/* ---------- Cielo de textos ---------- */

.innstante-cielo__filtros {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 8px;
}

.innstante-cielo__filtros button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: Poppins, system-ui, sans-serif;
	font-size: 13px;
	color: #ece7df;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 999px;
	padding: 7px 13px;
	cursor: pointer;
	transition: all 0.2s;
}

.innstante-cielo__filtros button::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--c);
	box-shadow: 0 0 8px var(--c);
}

.innstante-cielo__filtros button[aria-pressed="true"] {
	background: #ece7df;
	color: #111;
	border-color: #ece7df;
}

.innstante-cielo__campo {
	position: relative;
	height: 560px;
}

.innstante-cielo__fondo {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(1px 1px at 12% 30%, rgba(255, 255, 255, 0.5), transparent),
		radial-gradient(1px 1px at 35% 70%, rgba(255, 255, 255, 0.4), transparent),
		radial-gradient(1px 1px at 58% 22%, rgba(255, 255, 255, 0.45), transparent),
		radial-gradient(1px 1px at 80% 55%, rgba(255, 255, 255, 0.35), transparent),
		radial-gradient(1px 1px at 92% 15%, rgba(255, 255, 255, 0.4), transparent),
		radial-gradient(1px 1px at 22% 88%, rgba(255, 255, 255, 0.3), transparent);
}

.innstante-estrella {
	position: absolute;
	width: var(--s);
	height: var(--s);
	border-radius: 50%;
	background: var(--c);
	box-shadow: 0 0 14px 2px color-mix(in srgb, var(--c) 70%, transparent);
	cursor: pointer;
	border: 0;
	padding: 0;
	animation: innst-flota var(--d) ease-in-out infinite alternate;
	transition: opacity 0.5s ease, width 0.2s, height 0.2s;
}

@keyframes innst-flota {
	to {
		transform: translateY(-10px);
	}
}

.innstante-estrella:hover,
.innstante-estrella:focus-visible {
	outline: none;
	animation-play-state: paused;
	width: calc(var(--s) * 1.6);
	height: calc(var(--s) * 1.6);
	z-index: 3;
}

.innstante-estrella.is-apagada {
	opacity: 0.12;
}

.innstante-estrella__tip {
	position: absolute;
	left: 50%;
	bottom: calc(100% + 12px);
	transform: translateX(-50%);
	width: max-content;
	max-width: 240px;
	background: #ece7df;
	color: #111;
	font-family: Lora, Georgia, serif;
	font-style: italic;
	font-size: 14px;
	line-height: 1.4;
	padding: 8px 12px;
	border-radius: 10px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s;
	text-align: left;
}

.innstante-estrella__tip em {
	font-style: normal;
	font-family: Poppins, system-ui, sans-serif;
	font-size: 10px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #5e5953;
}

.innstante-estrella:hover .innstante-estrella__tip,
.innstante-estrella:focus-visible .innstante-estrella__tip {
	opacity: 1;
}

@media (max-width: 767px) {
	.innstante-cielo__campo {
		height: 460px;
	}
}

/* Ventana para leer un texto del cielo */
.innstante-ventana {
	position: fixed;
	inset: 0;
	z-index: 99992;
	background: rgba(10, 10, 10, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	animation: innst-entra 0.3s ease;
}

.innstante-ventana .innstante-entrada {
	max-width: 560px;
	width: 100%;
	max-height: 85vh;
	overflow: auto;
	position: relative;
}

.innstante-ventana__cerrar {
	position: absolute;
	top: 10px;
	right: 12px;
	background: none;
	border: 0;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: var(--ins-suave, #5e5953);
}

@media (prefers-reduced-motion: reduce) {
	:root {
		transition: none;
	}

	.innstante-letra,
	.innstante-onda,
	.innstante-estrella,
	.innstante-respira__anillo,
	.innstante-sobre__tapa,
	.innstante-sobre__carta,
	.innstante-entrada.is-nueva {
		animation: none !important;
		transition: none !important;
	}
}

/* El formulario oculto tras «Soltarlo» */
.innstante-form[hidden] {
	display: none !important;
}

/* Botón principal propio (no depende de los estilos del tema) */
.innstante [data-innstante-otra-carta],
.innstante-boton-principal {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: Poppins, system-ui, sans-serif;
	font-weight: 500;
	font-size: 0.95rem;
	line-height: 1.3;
	padding: 0.7rem 1.4rem;
	border-radius: 999px;
	border: 1px solid var(--innst-tinta);
	background: var(--innst-tinta);
	color: var(--innst-papel);
	cursor: pointer;
	white-space: nowrap;
	transition: opacity 0.2s ease;
}

.innstante [data-innstante-otra-carta]:hover,
.innstante-boton-principal:hover {
	opacity: 0.88;
}

.innstante-cielo__nota {
	margin: 14px 0 0;
	font-family: Poppins, system-ui, sans-serif;
	font-size: 13px;
	line-height: 1.5;
	color: #8f8a83;
	max-width: 60ch;
}
