/* ==========================================================================
   HQDM — video reviews: 16:9 cards in a snap carousel (as on the current site);
   a card opens the video full screen in an overlay (native <dialog>, site.js).
   ========================================================================== */
.hq-reviews { isolation: isolate; }
.hq-reviews::before {
	/* old hqdm.io dot grid, faint, behind the cards */
	content: "";
	position: absolute;
	left: 50%;
	top: 40%;
	width: 520px;
	aspect-ratio: 1;
	translate: -50% -50%;
	background: url("../../img/dots.webp") center / contain no-repeat;
	opacity: .18;
	z-index: -1;
	pointer-events: none;
}
.hq-vreviews { position: relative; max-width: var(--wide); margin-inline: auto; }
.hq-vreviews__track {
	/* three cards fill the container (old site: three per view); swipe / arrows for the rest */
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 2 * var(--sp-5)) / 3);
	gap: var(--sp-5);
	margin: calc(-1 * var(--sp-3)) 0;
	padding: var(--sp-3) 0;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}
.hq-vreviews__track::-webkit-scrollbar { display: none; }
@media (max-width: 1023px) { .hq-vreviews__track { grid-auto-columns: calc((100% - var(--sp-4)) / 2); gap: var(--sp-4); } }
@media (max-width: 600px) { .hq-vreviews__track { grid-auto-columns: 88%; gap: var(--sp-3); margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); } }
.hq-vreview { scroll-snap-align: start; margin: 0 !important; }
.hq-vreview__btn {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	font: inherit;
	font-size: 1rem;
	color: inherit;
	text-align: left;
	cursor: pointer;
	background: none;
	border: 0;
	border-radius: var(--r-2);
}
.hq-vreview__frame {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--r-2);
	background: var(--c-surface);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 24px 48px -28px rgba(0, 0, 0, .8);
	transition: transform var(--d-1) var(--ease-out);
}
.hq-vreview__frame::after {
	/* glass rim + lit top edge over the video still */
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), inset 0 1px 0 rgba(255, 255, 255, .22);
	pointer-events: none;
}
.hq-vreview__thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) brightness(.8); }
.hq-vreview__play {
	position: absolute;
	top: 46%;
	left: 50%;
	z-index: 1;
	width: 64px;
	height: 64px;
	translate: -50% -50%;
	border-radius: 50%;
	background: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .04)), rgba(14, 7, 30, .55);   /* dark enough not to take on the still's skin tones */
	-webkit-backdrop-filter: blur(12px) saturate(170%);
	backdrop-filter: blur(12px) saturate(170%);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), inset 0 1px 0 rgba(255, 255, 255, .4), 0 10px 30px -10px rgba(0, 0, 0, .8);
	transition: background-color var(--d-2) var(--ease), box-shadow var(--d-3) var(--ease), scale var(--d-3) var(--ease-out);
}
.hq-vreview__play::before { content: ""; position: absolute; left: 55%; top: 50%; translate: -50% -50%; border-left: 16px solid #fff; border-block: 10px solid transparent; }
.hq-vreview__meta {
	/* name, company and stars sit on the still, over a dark scrim (as on the old site) */
	position: absolute;
	inset: auto 0 0;
	z-index: 1;
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: end;
	column-gap: var(--sp-3);
	padding: var(--sp-7) var(--sp-5) var(--sp-4);
	border-radius: 0 0 var(--r-2) var(--r-2);
	background: linear-gradient(180deg, transparent, rgba(8, 3, 20, .55) 40%, rgba(8, 3, 20, .88));
	pointer-events: none;
}
.hq-vreview__name { color: #fff; font-family: var(--ff-heading); font-size: 1.1875rem; font-weight: var(--fw-heading); line-height: 1.25; letter-spacing: -.01em; }
.hq-vreview__company { grid-row: 2; color: rgba(255, 255, 255, .7); font-size: var(--fs-ui); line-height: 1.4; }
.hq-vreview__stars { grid-row: 1 / span 2; grid-column: 2; align-self: end; width: 84px; height: auto; margin-bottom: 3px; border-radius: 0; filter: drop-shadow(0 0 6px rgba(151, 71, 255, .7)); }
@media (hover: hover) {
	.hq-vreview__btn:hover .hq-vreview__play { scale: 1.08; background: linear-gradient(180deg, #8a5cf7, #6534d6); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 0 0 8px rgba(151, 71, 255, .18), 0 12px 36px -8px rgba(151, 71, 255, .95); }
}
.hq-vreview__btn:active .hq-vreview__frame { transform: scale(.985); }
.hq-vreview__btn:focus-visible { outline: none; }
.hq-vreview__btn:focus-visible .hq-vreview__frame { outline: 2px solid var(--c-accent); outline-offset: 3px; }

/* Arrows: glass discs on the card edges (desktop), a centred pair under the track on touch widths */
.hq-vreviews__nav { position: absolute; inset: 50% calc(-1 * var(--sp-5)) auto; display: flex; justify-content: space-between; translate: 0 -50%; pointer-events: none; z-index: 2; }
.hq-carousel-btn {
	position: relative;
	width: 48px;
	height: 48px;
	font-size: 1rem;
	border: 0;
	border-radius: 50%;
	color: var(--c-text-strong);
	background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .03)), rgba(18, 10, 38, .6);
	-webkit-backdrop-filter: blur(16px) saturate(170%);
	backdrop-filter: blur(16px) saturate(170%);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), inset 0 1px 0 rgba(255, 255, 255, .22), 0 12px 30px -12px rgba(0, 0, 0, .9);
	cursor: pointer;
	pointer-events: auto;
	transition: box-shadow var(--d-2) var(--ease), opacity var(--d-2) var(--ease), transform var(--d-1) var(--ease-out);
}
.hq-carousel-btn::before { content: ""; position: absolute; top: 50%; left: 50%; width: 9px; height: 9px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; translate: -65% -50%; rotate: 45deg; }
.hq-carousel-btn[data-dir="-1"]::before { rotate: -135deg; translate: -35% -50%; }
@media (hover: hover) { .hq-carousel-btn:not(:disabled):hover { box-shadow: inset 0 0 0 1px rgba(196, 173, 255, .5), inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 28px -6px rgba(151, 71, 255, .9); } }
.hq-carousel-btn:active:not(:disabled) { transform: scale(.94); }
.hq-carousel-btn:disabled { opacity: 0; pointer-events: none; }
@media (max-width: 1023px) {
	.hq-vreviews__nav { position: static; translate: none; justify-content: center; gap: var(--sp-3); margin-top: var(--sp-5); }
	.hq-carousel-btn:disabled { opacity: .3; }
}

/* Full-screen video overlay */
.hq-lightbox {
	width: 100vw;
	max-width: 100vw;
	height: 100dvh;
	max-height: 100dvh;
	margin: 0;
	padding: clamp(16px, 4vw, 48px);
	border: 0;
	background: transparent;
	display: none;     /* closed dialog must not cover the page (author display would override the UA rule) */
	place-items: center;
	opacity: 0;
	transition: opacity 200ms var(--ease), overlay 200ms allow-discrete, display 200ms allow-discrete;
}
.hq-lightbox[open] { display: grid; opacity: 1; transition-duration: var(--d-2); }
@starting-style { .hq-lightbox[open] { opacity: 0; } }
.hq-lightbox::backdrop { background: rgba(6, 2, 15, .86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.hq-lightbox__frame {
	position: relative;
	width: min(100%, calc((100dvh - 2 * clamp(16px, 4vw, 48px)) * 16 / 9), 1280px);
	aspect-ratio: 16 / 9;
	font-size: 1rem;
	border-radius: var(--r-2);
	overflow: hidden;
	background: #000;
	box-shadow: var(--shadow-2), 0 0 0 1px var(--c-line-2);
	transform: scale(1);
	transition: transform 300ms var(--ease-out);
}
@starting-style { .hq-lightbox[open] .hq-lightbox__frame { transform: scale(.98); } }
.hq-lightbox__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hq-lightbox__close {
	position: fixed;
	top: max(16px, env(safe-area-inset-top));
	right: max(16px, env(safe-area-inset-right));
	width: 44px;
	height: 44px;
	font-size: 1rem;
	border-radius: var(--r-pill);
	border: 1px solid var(--c-line-2);
	background: rgba(19, 11, 39, .55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='white' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M3 3l10 10M13 3 3 13'/%3E%3C/svg%3E") center no-repeat;
	-webkit-backdrop-filter: blur(18px) saturate(150%);
	backdrop-filter: blur(18px) saturate(150%);
	box-shadow: var(--shadow-1);
	cursor: pointer;
	transition: background-color var(--d-2) var(--ease), border-color var(--d-2) var(--ease);
}
@media (hover: hover) { .hq-lightbox__close:hover { background-color: var(--c-surface-2); border-color: rgba(221, 218, 231, .28); transition-duration: var(--d-1); } }
.hq-lightbox__close:active { transform: scale(.96); }
