@charset "UTF-8";
/* Hey Bacalar — Pieza larga de la laguna ("El agua viene de abajo")
   Lectura larga: columna de ~65 caracteres y piezas anchas que la rompen
   (corte de la península, estromatolito, tabla). Apertura y cierre a todo lo ancho.
   Movimiento 100 % CSS: scroll-driven animations con respaldo estático.
   Prefijo hbp- para no tocar el bloque hbl- del home. */

body.hb-pieza-pagina { overflow-x: clip; }
/* La envoltura del sitio (.hbp) trae overflow-x:hidden; eso apaga las animaciones con scroll. clip recorta igual sin romperlas. */
.hb-pieza-pagina .hbp { overflow-x: clip; overflow-y: visible; }
/* Astra le da margen a #primary y relleno al contenedor: la pieza va pegada al header. */
.hb-pieza-pagina #primary.hb-pieza { margin: 0; padding: 0; width: 100%; float: none; }
.hb-pieza-pagina #content > .ast-container, .hb-pieza-pagina .site-content > .ast-container { padding-top: 0; padding-bottom: 0; max-width: none; }

.hb-pieza {
	--hbp-teal: var(--brand, #0E8A96);
	--hbp-teal-deep: var(--brand-deep, #0B6E7A);
	--hbp-ink: var(--ink, #22302C);
	--hbp-text: var(--ink-2, #3C4A46);
	--hbp-muted: var(--muted, #6C7A75);
	--hbp-line: rgba(34, 48, 44, .14);
	--hbp-paper: var(--surface, #FFFFFF);
	--hbp-deep: #122125;
	--hbp-band-top: #24535B;
	--hbp-on-dark: #F2F5F4;
	--hbp-on-dark-2: #B9CACB;
	--hbp-aqua: var(--brand-bright, #1FBFE3);
	--hbp-f-display: var(--serif, "Fraunces", Georgia, serif);
	--hbp-f-body: var(--sans, "Figtree", system-ui, sans-serif);
	--hbp-f-mono: "Space Mono", ui-monospace, Menlo, Consolas, monospace;

	background: var(--base, #F7F2E8);
	color: var(--hbp-text);
	font-family: var(--hbp-f-body);
	font-size: 1.125rem;
	line-height: 1.75;
	width: 100%;
}
.hb-pieza *, .hb-pieza *::before, .hb-pieza *::after { box-sizing: border-box; }
.hb-pieza p { margin: 0; }

/* Astra le pone borde, relleno y fondo a blockquote, table y figure: aquí no. */
.hb-pieza blockquote { margin: 0; padding: 0; border: 0; background: none; quotes: none; font-style: normal; }
.hb-pieza blockquote::before, .hb-pieza blockquote::after { content: none; }
.hb-pieza figure { margin-top: 0; margin-bottom: 0; }
.hb-pieza figure:not(.hbp-ancho) { margin-inline: 0; }
.hb-pieza table, .hb-pieza th, .hb-pieza td { border: 0; background: none; }
.hb-pieza .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

.hb-pieza .hbp-pieza { display: grid; gap: clamp(72px, 10vw, 136px); padding-bottom: 0; }
.hb-pieza .hbp-col, .hb-pieza .hbp-ancho {
	width: 100%;
	margin-inline: auto;
	padding-left: max(16px, env(safe-area-inset-left, 0px));
	padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.hb-pieza .hbp-col { max-width: calc(680px + 32px); display: grid; gap: 1.15em; align-content: start; }
.hb-pieza .hbp-ancho { max-width: calc(1080px + 32px); }
.hb-pieza .hbp-cap { display: grid; gap: clamp(36px, 5vw, 56px); }

/* ── barra de lectura ───────────────────────────────── */
.hbp-progreso { display: none; }
@supports (animation-timeline: scroll()) {
	.hb-pieza .hbp-progreso {
		display: block;
		position: fixed;
		top: env(safe-area-inset-top, 0px);
		left: 0;
		right: 0;
		height: 3px;
		z-index: 9999;
		background: linear-gradient(90deg, var(--hbp-aqua), var(--hbp-teal));
		transform-origin: 0 50%;
		transform: scaleX(0);
		animation: hbp-progreso linear both;
		animation-timeline: scroll(root);
	}
	.admin-bar .hb-pieza .hbp-progreso { top: 32px; }
}
@keyframes hbp-progreso { to { transform: scaleX(1); } }

/* ── apertura ───────────────────────────────────────── */
.hbp-hero {
	position: relative;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	min-height: min(86vh, 860px);
	display: grid;
	align-items: end;
	overflow: hidden;
	background: linear-gradient(180deg, #2B4F57, var(--hbp-deep));
	isolation: isolate;
}
.hb-pieza .hbp-hero__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: 50% 55%;
	z-index: -2;
	animation: hbp-amanece 2.4s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes hbp-amanece { from { transform: scale(1.08); filter: brightness(.6); } to { transform: scale(1); filter: none; } }
.hb-pieza .hbp-hero__velo {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(18, 33, 37, .25) 0%, rgba(18, 33, 37, .10) 30%, rgba(18, 33, 37, .62) 60%, rgba(18, 33, 37, .88) 100%);
}
.hb-pieza .hbp-hero__txt {
	gap: 18px;
	padding-block: clamp(120px, 20vh, 220px) clamp(44px, 7vw, 84px);
	max-width: calc(820px + 32px);
}
.hb-pieza .hbp-hero__txt > * { animation: hbp-sube .9s cubic-bezier(.2, .7, .2, 1) both; }
.hb-pieza .hbp-hero__txt > :nth-child(2) { animation-delay: .15s; }
.hb-pieza .hbp-hero__txt > :nth-child(3) { animation-delay: .3s; }
.hb-pieza .hbp-hero__txt > :nth-child(4) { animation-delay: .45s; }
@keyframes hbp-sube { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.hb-pieza .hbp-kicker, .hb-pieza .hbp-num {
	font-family: var(--hbp-f-mono);
	font-size: 0.8rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	line-height: 1.4;
	color: var(--hbp-teal);
}
/* Sobre la foto, tonos claros fijos: el CSS adicional cambia --brand-bright a teal
   oscuro dentro de .hbp, y el teal oscuro sobre el cielo de la madrugada no se lee. */
.hb-pieza .hbp-hero .hbp-kicker { color: #A6E8DC; text-shadow: 0 1px 10px rgba(0, 0, 0, .45); }
.hb-pieza .hbp-titulo, .hb-pieza .hbp-h2 {
	font-family: var(--hbp-f-display);
	font-weight: 400;
	color: var(--hbp-ink);
	margin: 0;
	text-wrap: balance;
	letter-spacing: -0.015em;
}
.hb-pieza .hbp-titulo { font-size: clamp(3rem, 8.4vw, 6.4rem); line-height: .98; color: #FFFFFF; }
.hb-pieza .hbp-titulo em { font-style: italic; color: var(--hbp-aqua); }
.hb-pieza .hbp-hero .hbp-titulo { text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
.hb-pieza .hbp-hero .hbp-titulo em { color: #6FD9CE; }
.hb-pieza .hbp-bajada { font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.55; color: rgba(255, 255, 255, .94); max-width: 40ch; text-shadow: 0 1px 12px rgba(0, 0, 0, .4); }

.hb-pieza .hbp-credito {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 0;
	font-family: var(--hbp-f-mono);
	font-size: 0.76rem;
	letter-spacing: 0.06em;
	color: rgba(255, 255, 255, .82);
	padding-top: 16px;
	margin-top: 6px;
	border-top: 1px solid rgba(255, 255, 255, .22);
	max-width: 40rem;
}
.hb-pieza .hbp-credito span + span::before { content: "\00B7 "; margin: 0 10px; opacity: .5; }

/* ── encabezados de capítulo ────────────────────────── */
.hbp-cab { position: relative; display: grid; gap: 10px; margin-bottom: 0.4em; }
.hb-pieza .hbp-roman {
	font-family: var(--hbp-f-display);
	font-style: italic;
	font-weight: 300;
	font-size: clamp(3.4rem, 7vw, 5.6rem);
	line-height: .8;
	color: var(--hbp-teal);
	opacity: .9;
}
@media (min-width: 1100px) {
	.hb-pieza .hbp-roman { position: absolute; right: calc(100% + 36px); top: -0.04em; text-align: right; }
}
.hb-pieza .hbp-h2 { font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.08; }
.hb-pieza .hbp-capitular::first-letter {
	font-family: var(--hbp-f-display);
	float: left;
	font-size: 3.6em;
	line-height: .82;
	padding: 0.06em 0.06em 0 0;
	color: var(--hbp-teal);
}

/* ── corte de la península ──────────────────────────── */
.hbp-corte { display: grid; gap: 18px; }
.hb-pieza .hbp-corte__svg { display: block; width: 100%; height: auto; max-width: 100%; border-radius: 16px; background: #F6FAFA; }
.hb-pieza .hbp-corte__leyenda {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px 24px;
}
.hb-pieza .hbp-corte__leyenda li {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 10px;
	align-items: baseline;
	font-family: var(--hbp-f-display);
	font-size: 1.08rem;
	line-height: 1.3;
	color: var(--hbp-ink);
	padding-top: 12px;
	border-top: 1px solid var(--hbp-line);
}
.hb-pieza .hbp-corte__n { font-family: var(--hbp-f-mono); font-size: 0.74rem; color: var(--hbp-teal); letter-spacing: .08em; }
.hb-pieza .hbp-corte figcaption { font-family: var(--hbp-f-mono); font-size: 0.78rem; letter-spacing: 0.06em; color: var(--hbp-muted); }

.hb-pieza .hbp-lluvia line { animation: hbp-lluvia 1.5s linear infinite; animation-delay: var(--d, 0s); }
@keyframes hbp-lluvia {
	0% { transform: translateY(-16px); opacity: 0; }
	15% { opacity: 1; }
	100% { transform: translateY(100px); opacity: 0; }
}
.hb-pieza .hbp-filtra path { animation: hbp-filtra 2.2s linear infinite; }
@keyframes hbp-filtra { to { stroke-dashoffset: -26; } }
.hb-pieza .hbp-rio { animation: hbp-rio 1.6s linear infinite; }
@keyframes hbp-rio { to { stroke-dashoffset: -54; } }
.hb-pieza .hbp-sube { animation: hbp-rio 1.4s linear infinite; }
.hb-pieza .hbp-brota circle { animation: hbp-brota 2.8s ease-out infinite; animation-delay: var(--d, 0s); opacity: 0; }
@keyframes hbp-brota {
	0% { transform: translateY(0); opacity: 0; }
	15% { opacity: .95; }
	100% { transform: translateY(-62px); opacity: 0; }
}
.hb-pieza .hbp-brillo line { animation: hbp-brillo 3.2s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes hbp-brillo { 0%, 100% { opacity: .15; } 50% { opacity: .95; } }

/* ── estromatolito ──────────────────────────────────── */
.hbp-estro {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: clamp(24px, 5vw, 64px);
	align-items: center;
}
.hb-pieza .hbp-cita p {
	font-family: var(--hbp-f-display);
	font-style: italic;
	font-size: clamp(1.8rem, 3.8vw, 2.8rem);
	line-height: 1.18;
	color: var(--hbp-ink);
	text-wrap: balance;
	padding-top: 22px;
	border-top: 2px solid var(--hbp-teal);
}
.hb-pieza .hbp-estro__svg { display: block; width: 100%; max-width: 420px; height: auto; justify-self: center; }

/* ── nota de fuente ─────────────────────────────────── */
.hbp-nota {
	margin-top: 0.6em;
	background: var(--hbp-paper);
	border-left: 3px solid var(--hbp-teal);
	padding: 18px 22px 20px;
	display: grid;
	gap: 6px;
	font-size: 0.98rem;
	line-height: 1.6;
}
.hb-pieza .hbp-nota-k { font-family: var(--hbp-f-mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hbp-teal-deep); }

/* ── lista citada de la Dirección de Ecología ───────── */
.hbp-citada { margin-top: 0.4em; background: var(--hbp-paper); padding: 26px 28px 22px; border-radius: 12px; display: grid; gap: 18px; }
.hb-pieza .hbp-citada ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.hb-pieza .hbp-citada li { position: relative; padding-left: 28px; color: var(--hbp-ink); line-height: 1.55; }
.hb-pieza .hbp-citada li::before { content: "\201C "; position: absolute; left: 0; top: -6px; font-family: var(--hbp-f-display); font-size: 1.8rem; color: var(--hbp-teal); line-height: 1; }
.hb-pieza .hbp-citada figcaption { font-family: var(--hbp-f-mono); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--hbp-muted); }
.hb-pieza .hbp-citada figcaption a { color: inherit; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; }

/* ── tabla de zonas con velocidades a escala ───────── */
.hbp-tabla { display: grid; gap: 12px; overflow-x: auto; }
.hb-pieza .hbp-tabla table { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 1rem; line-height: 1.45; margin: 0; }
.hb-pieza .hbp-tabla th, .hb-pieza .hbp-tabla td { text-align: left; padding: 16px 18px 16px 0; border-bottom: 1px solid var(--hbp-line); vertical-align: middle; }
.hb-pieza .hbp-tabla thead th {
	font-family: var(--hbp-f-mono);
	font-weight: 400;
	font-size: 0.74rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--hbp-muted);
	border-bottom: 1px solid var(--hbp-ink);
}
.hb-pieza .hbp-tabla tbody th { font-family: var(--hbp-f-display); font-weight: 400; font-size: 1.35rem; color: var(--hbp-teal); white-space: nowrap; width: 5em; }
.hb-pieza .hbp-tabla td { color: var(--hbp-ink); }
.hb-pieza .hbp-tabla td:last-child { width: 300px; padding-right: 0; }
.hb-pieza .hbp-vel { display: grid; grid-template-columns: 170px auto; gap: 14px; align-items: center; }
.hb-pieza .hbp-vel__pista { height: 8px; border-radius: 4px; background: #EFEBE2; overflow: hidden; }
.hb-pieza .hbp-vel__barra {
	display: block;
	height: 100%;
	width: calc(var(--v) * 100%);
	border-radius: 4px;
	background: linear-gradient(90deg, var(--hbp-aqua), var(--hbp-teal));
	transform-origin: 0 50%;
}
.hb-pieza .hbp-vel--no .hbp-vel__barra { background: repeating-linear-gradient(135deg, #C9BFA8 0 5px, transparent 5px 10px); }
.hb-pieza .hbp-vel__txt { font-family: var(--hbp-f-mono); font-size: 0.92rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hb-pieza .hbp-dof { font-family: var(--hbp-f-mono); font-size: 0.76rem; letter-spacing: 0.04em; color: var(--hbp-muted); }

/* ── cierre a todo lo ancho, con luz de agua en movimiento ── */
.hbp-cierre {
	position: relative;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	overflow: hidden;
	isolation: isolate;
	color: var(--hbp-on-dark-2);
	background: linear-gradient(180deg, var(--hbp-band-top), var(--hbp-deep));
	padding-block: clamp(80px, 12vw, 150px);
}
.hb-pieza .hbp-cierre__luz {
	position: absolute;
	inset: -20%;
	z-index: -1;
	opacity: .5;
	background:
		radial-gradient(ellipse 22% 10% at 20% 30%, rgba(143, 208, 214, .35), transparent 70%),
		radial-gradient(ellipse 18% 8% at 70% 20%, rgba(143, 208, 214, .28), transparent 70%),
		radial-gradient(ellipse 26% 12% at 55% 70%, rgba(143, 208, 214, .22), transparent 70%),
		radial-gradient(ellipse 16% 7% at 85% 65%, rgba(143, 208, 214, .3), transparent 70%);
	filter: blur(6px);
	animation: hbp-caustica 18s ease-in-out infinite alternate;
}
@keyframes hbp-caustica {
	from { transform: translate3d(-3%, -2%, 0) scale(1); }
	to { transform: translate3d(3%, 3%, 0) scale(1.08); }
}
.hb-pieza .hbp-cierre .hbp-col { gap: 22px; }
.hb-pieza .hbp-cierre-cita p {
	font-family: var(--hbp-f-display);
	font-style: italic;
	font-size: clamp(1.6rem, 3.2vw, 2.3rem);
	line-height: 1.28;
	color: var(--hbp-on-dark);
	text-wrap: pretty;
}
.hb-pieza .hbp-cierre-p { font-size: 1.15rem; }
.hb-pieza .hbp-btn {
	justify-self: start;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 54px;
	padding: 0 26px;
	margin-top: 8px;
	background: var(--hbp-teal);
	color: #FFFFFF;
	font-family: var(--hbp-f-body);
	font-weight: 600;
	font-size: 1rem;
	text-decoration: none;
	border-radius: 2px;
	transition: background-color .2s ease, gap .2s ease;
}
.hb-pieza .hbp-btn svg { width: 18px; height: 18px; }
.hb-pieza .hbp-btn:hover { background: #4FA0AC; color: #FFFFFF; gap: 14px; }
.hb-pieza .hbp-btn:focus-visible { outline: 2px solid var(--hbp-aqua); outline-offset: 3px; }

/* ── fuentes ────────────────────────────────────────── */
.hbp-fuentes { padding-bottom: clamp(56px, 7vw, 96px); }
.hb-pieza .hbp-fuentes h2 { font-family: var(--hbp-f-mono); font-weight: 400; font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--hbp-muted); margin: 0; }
.hb-pieza .hbp-fuentes ol { margin: 0; padding-left: 1.4em; display: grid; gap: 10px; font-size: 0.92rem; line-height: 1.5; }
.hb-pieza .hbp-fuentes li::marker { font-family: var(--hbp-f-mono); color: var(--hbp-muted); }
.hb-pieza .hbp-fuentes span { color: var(--hbp-ink); font-weight: 600; }
.hb-pieza .hbp-fuentes a { color: var(--hbp-muted); overflow-wrap: anywhere; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; }
.hb-pieza .hbp-fuentes a:hover { color: var(--hbp-teal); }

/* ── aparecer al hacer scroll (solo donde el navegador lo soporta) ── */
@supports (animation-timeline: view()) {
	.hb-pieza .hbp-rv {
		animation: hbp-aparece linear both;
		animation-timeline: view();
		animation-range: entry 0% entry 55%;
	}
	.hb-pieza .hbp-estro__svg path {
		transform-box: view-box;
		transform-origin: 160px 214px;
		animation: hbp-capa ease-out both;
		animation-timeline: view();
		/* Cada capa tiene su tramo (--a a --b), calculado en la plantilla:
		   una tras otra y cada vez más lentas. */
		animation-range: cover var(--a, 10%) cover var(--b, 20%);
	}
	.hb-pieza .hbp-vel__barra {
		animation: hbp-barra linear both;
		animation-timeline: view();
		animation-range: entry 20% cover 40%;
	}
}
@keyframes hbp-aparece { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes hbp-capa    { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes hbp-barra   { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ── móvil ──────────────────────────────────────────── */
@media (max-width: 760px) {
	.hb-pieza .hbp-hero { min-height: 78vh; }
	.hb-pieza .hbp-corte__leyenda { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hb-pieza .hbp-estro { grid-template-columns: minmax(0, 1fr); }
	.hb-pieza .hbp-estro__svg { max-width: 300px; }
	.hb-pieza .hbp-tabla table { min-width: 0; }
	.hb-pieza .hbp-tabla thead { display: none; }
	.hb-pieza .hbp-tabla tbody tr { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); column-gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--hbp-line); }
	.hb-pieza .hbp-tabla tbody th, .hb-pieza .hbp-tabla td { border: 0; padding: 0; width: auto; }
	.hb-pieza .hbp-tabla tbody th { grid-row: span 2; }
	.hb-pieza .hbp-tabla td:last-child { width: auto; padding-top: 10px; }
	.hb-pieza .hbp-vel { grid-template-columns: minmax(0, 1fr) auto; }
}

/* ── sin movimiento para quien lo pidió ─────────────── */
@media (prefers-reduced-motion: reduce) {
	.hb-pieza *, .hb-pieza *::before, .hb-pieza .hbp-progreso { animation: none !important; transition: none !important; }
	.hb-pieza .hbp-cierre__luz { display: none; }
}
