/* MakeWeb - Vimeo Sound Badge
   Blocky and flat to match the site: square corners, solid brand fills,
   no soft shadows. See the croc-swim play button for the same idiom. */

/* ---------------------------------------------------------------------------
   1. Hero sizing
   The promo hero is a full-bleed 16:9 video. Show the whole frame where the
   screen allows it, and never let the section run past the fold. The offset is
   the notice bar plus the fixed header bar; JS measures the real value, the
   165px default is what desktop reads today.
   --------------------------------------------------------------------------- */
body.home .et_builder_inner_content > .et_pb_section:first-of-type:has(.mw-vimeo-background),
.mw-vsb-hero {
	/* Pre-JS fallback only. sound-badge.js measures the real header height and
	   overwrites this inline, which wins because inline !important beats a
	   stylesheet !important. */
	height: min(56.25vw, calc(100vh - 165px)) !important;
	height: min(56.25vw, calc(100svh - 165px)) !important;
	min-height: 0 !important;
	/* The band behind an overlaying header reads as deliberate letterboxing
	   rather than a white strip if it is ever exposed. */
	background-color: #1C1C1C;
}

/* Optional: soften the dark wash the section paints over the video. Only
   applied when the module is configured with a scrim value. */
.mw-vsb-hero[data-mw-vsb-scrim]::after {
	opacity: var(--mw-vsb-scrim) !important;
}

/* ---------------------------------------------------------------------------
   2. The badge
   --------------------------------------------------------------------------- */
.mw-vsb {
	position: absolute;
	/* --mw-vsb-inset is the strip of the section sitting behind an overlaying
	   header. Keeps the badge inside the video, not hidden under the menu. */
	top: calc(var(--mw-vsb-inset, 0px) + 22px);
	right: 22px;
	z-index: 5;
	display: inline-flex;
	align-items: stretch;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	font-family: 'Montserrat', Helvetica, Arial, sans-serif;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
}

.mw-vsb-label {
	display: flex;
	align-items: center;
	padding: 0 16px;
	background: rgba(20, 16, 27, 0.74);
	color: #fff;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 1.6px;
	line-height: 1.2;
	text-transform: uppercase;
	white-space: nowrap;
	transition: background 0.25s ease;
}

.mw-vsb-icon {
	display: flex;
	flex: 0 0 52px;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	background: #F54C2F;
	transition: background 0.25s ease, box-shadow 0.25s ease;
}

.mw-vsb-icon svg {
	display: block;
	width: 24px;
	height: 24px;
	fill: #fff;
}

.mw-vsb .mw-vsb-on {
	display: none;
}

.mw-vsb:hover .mw-vsb-icon,
.mw-vsb:focus-visible .mw-vsb-icon {
	background: #FB852F;
	box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.18);
}

.mw-vsb:hover .mw-vsb-label,
.mw-vsb:focus-visible .mw-vsb-label {
	background: rgba(20, 16, 27, 0.88);
}

.mw-vsb:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

/* Sound on: teal fill, speaker-on icon, label switches to Mute. */
.mw-vsb[aria-pressed="true"] .mw-vsb-icon {
	background: #009C91;
}

.mw-vsb[aria-pressed="true"]:hover .mw-vsb-icon,
.mw-vsb[aria-pressed="true"]:focus-visible .mw-vsb-icon {
	background: #00b3a6;
}

.mw-vsb[aria-pressed="true"] .mw-vsb-off {
	display: none;
}

.mw-vsb[aria-pressed="true"] .mw-vsb-on {
	display: block;
}

/* Docked to the corner of the screen once the hero has scrolled off, so the
   sound can still be turned off. Two classes, so this beats the base top/right
   without needing !important. */
.mw-vsb.is-floating {
	position: fixed;
	top: auto;
	right: 20px;
	bottom: 20px;
	z-index: 9998;
	animation: mw-vsb-dock 0.25s ease-out;
}

@keyframes mw-vsb-dock {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* One short attention pulse on load so the badge is noticed, then it settles.
   Square ring, in keeping with the rest of the site. */
@keyframes mw-vsb-nudge {
	0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55); }
	70%  { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); }
	100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.mw-vsb.is-nudging .mw-vsb-icon {
	animation: mw-vsb-nudge 1.6s ease-out 3;
}

@media (prefers-reduced-motion: reduce) {
	.mw-vsb.is-nudging .mw-vsb-icon,
	.mw-vsb.is-floating {
		animation: none;
	}

	.mw-vsb-icon,
	.mw-vsb-label {
		transition: none;
	}
}

/* ---------------------------------------------------------------------------
   3. Phone
   Touch target stays above 44px, copy stays readable, and the badge sits clear
   of the burned-in captions along the bottom of the frame.
   --------------------------------------------------------------------------- */
@media (max-width: 767px) {
	.mw-vsb {
		top: calc(var(--mw-vsb-inset, 0px) + 12px);
		right: 12px;
	}

	.mw-vsb.is-floating {
		top: auto;
		right: 12px;
		bottom: 12px;
	}

	.mw-vsb-icon {
		flex: 0 0 44px;
		width: 44px;
		height: 44px;
	}

	.mw-vsb-icon svg {
		width: 20px;
		height: 20px;
	}

	.mw-vsb-label {
		padding: 0 11px;
		font-size: 10px;
		letter-spacing: 1px;
	}
}

@media (max-width: 360px) {
	.mw-vsb-label {
		padding: 0 10px;
		font-size: 9.5px;
		letter-spacing: 0.8px;
	}
}
