/* Historification — Ken Burns "Visual Summary" slideshow (public pages).
   Port of the old obelisk article-page slideshow. */

@keyframes hsf-asl-tl   { from { transform: scale(1.0) translate(0,0); } to { transform: scale(1.15) translate(-4%,-4%); } }
@keyframes hsf-asl-tr   { from { transform: scale(1.0) translate(0,0); } to { transform: scale(1.15) translate(4%,-4%); } }
@keyframes hsf-asl-bl   { from { transform: scale(1.0) translate(0,0); } to { transform: scale(1.15) translate(-4%,4%); } }
@keyframes hsf-asl-br   { from { transform: scale(1.0) translate(0,0); } to { transform: scale(1.15) translate(4%,4%); } }
@keyframes hsf-asl-zoom { from { transform: scale(1.0); }                to { transform: scale(1.18); } }

.hsf-asl-wrap {
	float: right;
	width: 337px;
	max-width: 100%;
	margin: 0.25rem 0 1.25rem 1.75rem;
	background: #ebebeb;
	border-radius: 10px;
	padding: 10px 10px 8px;
	box-sizing: border-box;
}
.hsf-asl-center .hsf-asl-wrap {
	float: none;
	margin: 2rem auto 1.5rem;
}
/* Some themes (e.g. yummy-bites) set clear:both on every heading, which pushes a
   heading placed right after our floated summary/video BELOW it instead of letting
   the text wrap around it. Cancel that just for the heading next to our element. */
.hsf-asl-wrap + h1, .hsf-asl-wrap + h2, .hsf-asl-wrap + h3, .hsf-asl-wrap + h4,
.hsf-asl-wrap + h5, .hsf-asl-wrap + h6,
.hsf-ytvideo-wrap + h1, .hsf-ytvideo-wrap + h2, .hsf-ytvideo-wrap + h3,
.hsf-ytvideo-wrap + h4, .hsf-ytvideo-wrap + h5, .hsf-ytvideo-wrap + h6 {
	clear: none;
}
@media (max-width: 640px) {
	.hsf-asl-wrap {
		float: none;
		margin: 1rem auto 1.5rem;
	}
}

.hsf-asl-label {
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: #888;
	text-align: center;
	margin: 0 0 7px;
}

.hsf-asl-viewport {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 6px;
	overflow: hidden;
	background: #ccc;
}

.hsf-asl-layer {
	position: absolute;
	inset: 0;
	opacity: 0;
}
.hsf-asl-layer img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hsf-asl-punchline {
	position: absolute;
	bottom: 0; left: 0; right: 0;
	z-index: 2;
	background: linear-gradient(transparent, rgba(0,0,0,0.65) 20%, rgba(0,0,0,0.92));
	color: #fff;
	font-size: 1.75rem;
	font-weight: 800;
	line-height: 1.2;
	padding: 5rem 1.25rem 2.8rem;
	text-align: left;
	text-transform: uppercase;
	opacity: 0;
	transition: opacity 0.5s ease;
	pointer-events: none;
}

.hsf-asl-counter {
	position: absolute;
	top: 6px; right: 8px;
	z-index: 2;
	color: rgba(255,255,255,0.85);
	font-size: 0.68rem;
	font-weight: 600;
	pointer-events: none;
}

.hsf-asl-controls {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 6px;
}
.hsf-asl-scrub {
	flex: 1;
	height: 4px;
	background: #d0d0d0;
	border-radius: 2px;
	overflow: hidden;
	cursor: pointer;
}
.hsf-asl-scrub-fill {
	height: 100%;
	width: 0%;
	background: #fd7e14;
}
/* Theme-proof: some themes (e.g. yummy-bites) style <button> with a coloured
   background/padding, which turned this control into a yellow square. Force a
   bare, transparent button and draw the play/pause icon in pure CSS (no emoji
   glyph, so it renders identically on every theme/font). */
.hsf-asl-controls .hsf-asl-pause {
	flex-shrink: 0;
	box-sizing: border-box;
	width: 18px !important;
	height: 18px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	max-width: none !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	outline: none !important;
	background: none !important;
	background-color: transparent !important;
	box-shadow: none !important;
	color: #888 !important;
	font-size: 0;
	cursor: pointer;
	border-radius: 3px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: color 0.15s;
	-webkit-appearance: none;
	appearance: none;
}
.hsf-asl-controls .hsf-asl-pause:hover { color: #555 !important; background: none !important; }
/* Pause icon (default, playing): two vertical bars via currentColor. */
.hsf-asl-controls .hsf-asl-pause::before {
	content: '';
	display: block;
	width: 8px;
	height: 10px;
	border-left: 3px solid currentColor;
	border-right: 3px solid currentColor;
	box-sizing: border-box;
}
/* Play icon (when paused): a right-pointing triangle. */
.hsf-asl-controls .hsf-asl-pause.is-paused::before {
	width: 0;
	height: 0;
	border: 0;
	border-top: 6px solid transparent;
	border-bottom: 6px solid transparent;
	border-left: 10px solid currentColor;
}

/* Published YouTube video embed — floated beside the article intro. */
.hsf-ytvideo-wrap {
	float: right;
	width: 300px;
	max-width: 100%;
	margin: 0.25rem 0 1.25rem 1.75rem;
	background: #ebebeb;
	border-radius: 10px;
	padding: 10px 10px 8px;
	box-sizing: border-box;
}
@media (max-width: 640px) {
	.hsf-ytvideo-wrap {
		float: none;
		margin: 1rem auto 1.5rem;
	}
}
.hsf-ytvideo-frame {
	position: relative;
	width: 100%;
	aspect-ratio: 9 / 16; /* vertical Short (default) */
	border-radius: 6px;
	overflow: hidden;
	background: #000;
}
.hsf-ytvideo-square .hsf-ytvideo-frame { aspect-ratio: 1 / 1; }
.hsf-ytvideo-frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

/* Real stamp images inserted into article bodies (Wikimedia Commons). */
.hsf-article-figure {
	margin: 1.4em auto;
	max-width: 420px;
	text-align: center;
}
.hsf-article-figure img {
	width: 100%;
	height: auto;
	border-radius: 6px;
	box-shadow: 0 1px 6px rgba(0,0,0,.18);
}
.hsf-article-figure figcaption {
	font-size: .85em;
	color: #555;
	margin-top: .5em;
	line-height: 1.4;
}
.hsf-article-figure .hsf-img-credit { color: #888; }
.hsf-article-figure .hsf-img-credit a { color: inherit; text-decoration: underline; }
