/*
 * The footer's "Site hits since 2017" card (patterns.ts hitsCard(), visit.js), under the opening hours: a small dark card in the footer's
 * colours, the total as split-flap digit tiles that roll to the latest number, and today's hits in a green pill.
 * Plain CSS – no WebGL, no web fonts. The rolling and the dot's pulse stop with reduced motion.
 */
.q-hits {
	--q-hits-blue: #4cb8ff;
	--q-hits-green: #3fd68a;
	--q-hits-line: color-mix(in srgb, var(--wp--preset--color--on-dark, #f6f0e6) 13%, transparent);
	display: inline-flex;
	flex-direction: column;
	gap: .35rem;
	margin: 1.6rem 0 0;
	padding: .5rem .8rem .6rem .7rem;
	border: 1px solid var(--q-hits-line);
	border-radius: 12px;
	background: color-mix(in srgb, var(--wp--preset--color--espresso, #1f1813), #fff 5%);
	box-shadow: 0 1px 0 color-mix(in srgb, #fff 6%, transparent) inset, 0 14px 26px -16px rgb(76 184 255 / .3);
	font-family: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
	line-height: 1;
	max-width: 100%;
}
.q-hits__head {
	display: flex;
	align-items: center;
	gap: .4rem;
	font-size: .62rem;
	letter-spacing: .14em;
}
.q-hits__dot {
	width: .45rem;
	height: .45rem;
	border-radius: 50%;
	background: var(--q-hits-green);
	box-shadow: 0 0 0 2px rgb(63 214 138 / .22), 0 0 7px rgb(63 214 138 / .55);
	animation: q-hits-pulse 2.4s ease-in-out infinite;
}
@keyframes q-hits-pulse {
	50% { box-shadow: 0 0 0 3px rgb(63 214 138 / .1), 0 0 10px rgb(63 214 138 / .75); }
}
.q-hits__label {
	color: var(--wp--preset--color--on-dark, #f6f0e6);
	font-weight: 700;
	text-transform: uppercase;
}
.q-hits__since {
	color: var(--wp--preset--color--on-dark-muted, #b9ad9f);
	letter-spacing: .04em;
	opacity: .8;
}
.q-hits__row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: .4rem .65rem;
}
.q-hits__num {
	display: inline-flex;
	align-items: flex-end;
	gap: .15rem;
	font-size: 1.05rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}
/* One split-flap tile: a window one digit tall over a reel of 0–9, moved to the digit in --d. */
.q-hits__d {
	position: relative;
	display: inline-block;
	width: 1em;
	height: 1.4em;
	overflow: hidden;
	border: 1px solid rgb(76 184 255 / .3);
	border-radius: .28em;
	background: linear-gradient(180deg, color-mix(in srgb, var(--wp--preset--color--espresso, #1f1813), #0b2238 45%) 0 50%, color-mix(in srgb, var(--wp--preset--color--espresso, #1f1813), #000 30%) 50% 100%);
	box-shadow: 0 1px 3px rgb(0 0 0 / .35), 0 0 0 1px rgb(0 0 0 / .25) inset;
}
/* The flap's fold across the middle. */
.q-hits__d::after {
	content: "";
	position: absolute;
	inset: calc(50% - .5px) 0 auto;
	height: 1px;
	background: rgb(0 0 0 / .45);
	box-shadow: 0 1px 0 rgb(255 255 255 / .05);
}
.q-hits__reel {
	display: block;
	transform: translateY(calc(var(--d, 0) * -1.4em));
	transition: transform 1.1s cubic-bezier(.2, .85, .25, 1);
}
.q-hits__reel > span {
	display: block;
	height: 1.4em;
	line-height: 1.4em;
	text-align: center;
	color: var(--q-hits-blue);
	text-shadow: 0 0 6px rgb(76 184 255 / .4);
}
.q-hits__sep {
	color: var(--wp--preset--color--on-dark-muted, #b9ad9f);
	margin: 0 -.05em;
	padding-bottom: .05em;
}
.q-hits__today {
	padding: .22rem .55rem;
	border: 1px solid rgb(63 214 138 / .35);
	border-radius: 999px;
	background: rgb(63 214 138 / .1);
	color: var(--q-hits-green);
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .02em;
	white-space: nowrap;
}
@media (max-width: 781px) {
	.q-hits { padding: .45rem .7rem .55rem; }
}
@media (prefers-reduced-motion: reduce) {
	.q-hits__dot { animation: none; }
	.q-hits__reel { transition: none; }
}
