/* =============================================================
   Viscato Testimonials — viscato.com
   ============================================================= */

/* Wrapper */
.vt-wrap {
	position: relative;
	overflow: hidden;
	min-height: 520px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Show focus ring on keyboard navigation (fallback for all browsers, incl. Safari < 15.4).
   :not(:focus-visible) suppresses it for mouse/pointer focus in modern browsers. */
.vt-wrap:focus {
	outline: 2px solid #000;
	outline-offset: -2px;
}
.vt-wrap:focus:not(:focus-visible) {
	outline: none;
}

/* ----- Background Text ----- */
.vt-bg-text {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	font-size: clamp(64px, 18vw, 260px);
	font-weight: 900;
	line-height: 0.88;
	letter-spacing: -0.03em;
	text-align: center;
	text-transform: uppercase;
	color: #000;
	pointer-events: none;
	user-select: none;
	z-index: 0;
	overflow: hidden;
	padding: 0 0.05em;
}

/* ----- Stage (cards container) ----- */
.vt-stage {
	/* Intentionally absolute, covers the full wrapper so cards can be positioned within it.
	   pointer-events:none means the stage itself never blocks clicks — only .vt-active cards
	   restore pointer-events. Arrows/dots are siblings of .vt-stage, not children, so they
	   are always interactive regardless of this setting. */
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}

/* ----- Cards ----- */
.vt-card {
	position: absolute;
	top: 50%;
	left: 50%;
	/* transform set by JS (_entryTransform on init, _finalTransform when dealt) */
	width: calc(100% - 80px);
	max-width: 560px;
	background-color: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 28px rgba(0, 0, 0, 0.10);
	padding: 32px 36px;
	opacity: 0;
	pointer-events: none;
	/* Both opacity and transform animate so the card slides up as it fades in */
	transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* A dealt card: fully visible and interactive */
.vt-card.vt-visible {
	opacity: 1;
	pointer-events: auto;
}

/* ----- Card inner layout ----- */
.vt-card-inner {
	display: flex;
	align-items: flex-start;
	gap: 20px;
}

/* Quote icon */
.vt-quote-icon {
	flex-shrink: 0;
	margin-top: 2px;
}

.vt-quote-icon svg {
	display: block;
	width: 40px;
	height: 40px;
	fill: #333;
	opacity: 0.35;
}

/* Body */
.vt-body {
	flex: 1;
	min-width: 0;
}

.vt-text {
	font-size: 1.05rem;
	line-height: 1.65;
	color: #222;
	margin: 0 0 16px;
}

.vt-author {
	font-size: 0.875rem;
	color: #222;
	margin: 0;
}

.vt-author strong {
	font-weight: 700;
}

.vt-company {
	font-weight: 400;
}

/* ----- Arrows ----- */
.vt-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 2px solid #333;
	background: transparent;
	color: #333;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.vt-arrow:hover {
	background-color: #333;
	color: #fff;
}

/* Keyboard focus ring — :focus is the old-browser fallback; :not(:focus-visible) removes it
   for mouse clicks in modern browsers so only keyboard navigation triggers the ring. */
.vt-arrow:focus {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}
.vt-arrow:focus:not(:focus-visible) {
	outline: none;
}

.vt-prev { left: 16px; }
.vt-next { right: 16px; }

/* ----- Dots ----- */
.vt-dots {
	position: absolute;
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 8px;
	z-index: 20;
}

.vt-dot {
	/* Visually 8px circle; padding expands tap area to 24×24px (WCAG touch target guideline).
	   background-clip: content-box confines the fill colour to the 8px content box. */
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.25);
	background-clip: content-box;
	box-sizing: content-box;
	border: none;
	cursor: pointer;
	padding: 8px;
	transition: background-color 0.25s ease, transform 0.25s ease;
}

.vt-dot.vt-active {
	background: #000;
	background-clip: content-box;
	transform: scale(1.35);
}

.vt-dot:focus {
	outline: 2px solid #000;
	outline-offset: 2px;
}
.vt-dot:focus:not(:focus-visible) {
	outline: none;
}

/* ----- Screen-reader announcer (visually hidden) ----- */
.vt-sr-announce {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* =============================================================
   Mobile
   ============================================================= */
@media (max-width: 767px) {
	.vt-bg-text {
		font-size: clamp(52px, 24vw, 120px);
	}

	.vt-card {
		width: calc(100% - 32px);
		padding: 24px 20px;
	}

	/* Arrows hidden on mobile — also marked aria-hidden via JS */
	.vt-arrow {
		display: none;
	}

	.vt-card-inner {
		gap: 14px;
	}

	.vt-quote-icon svg {
		width: 32px;
		height: 32px;
	}

	.vt-text {
		font-size: 0.975rem;
	}
}
