/* ==========================================================================
   Infinite Profile — team member section (image + name, role, contact rows,
   vertical textured highlight word). Defaults match theinfiniteagents.com
   single-team layout.
   ========================================================================== */

.ibb-profile {
	--ibb-p-bg: #000000;
	--ibb-p-name: #ffffff;
	--ibb-p-role: #ED3131;
	--ibb-p-label: #ffffff;
	--ibb-p-value: #d9d9d9;
	--ibb-p-hl: #ED3131;
	--ibb-p-hl-opacity: .7;
	--ibb-p-hl-size: 100px;
	--ibb-p-img-w: 500px;
	--ibb-p-minh: 440px;
	--ibb-p-fit: cover;
	--ibb-p-pos: center top;
	--ibb-p-pad: 65px 70px 40px;
	--ibb-p-hl-space: 220px;

	/* Layout reacts to the width of THIS section (container queries), not the screen,
	   so it also works inside narrow columns or two-up layouts. */
	container-type: inline-size;
	container-name: ibb-profile;
	position: relative;
	isolation: isolate;
	overflow: hidden;
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	background-color: var(--ibb-p-bg);
	font-family: "Red Hat Display", system-ui, -apple-system, "Segoe UI", sans-serif;
	text-align: left;
}
.ibb-profile__inner {
	display: flex;
	align-items: stretch;
	min-height: var(--ibb-p-minh);
}
.ibb-profile *,
.ibb-profile *::before,
.ibb-profile *::after { box-sizing: border-box; }

.ibb-profile--img-right .ibb-profile__inner { flex-direction: row-reverse; }

/* ---- Image (GIF-safe: the original file is always used) ---------------- */
.ibb-profile__media {
	position: relative;
	flex: 0 0 var(--ibb-p-img-w);
	max-width: 50%;
	overflow: hidden;
	font-size: 0;
}
.ibb-profile .ibb-profile__img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	border: 0;
	border-radius: 0;
	object-fit: var(--ibb-p-fit);
	object-position: var(--ibb-p-pos);
}

/* ---- Video (self-hosted file) ---------------------------------------- */
.ibb-profile .ibb-profile__video {
	position: absolute;
	inset: 0;
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	margin: 0;
	border: 0;
	background: #000;
	object-fit: var(--ibb-p-fit);
	object-position: var(--ibb-p-pos);
}
.ibb-profile__media.ibb-js:not(:has([data-ibb-controls="native"])) .ibb-profile__video { cursor: pointer; }

/* ---- Video (YouTube / Vimeo) — scaled to fill like object-fit: cover ---- */
.ibb-profile__media--embed { container-type: size; background: #000; }
.ibb-profile__embed {
	position: absolute;
	inset: 0;
	overflow: hidden;
	background-color: #000;
	background-position: center;
	background-size: cover;
}
.ibb-profile__embed iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	border: 0;
}
/* Background-style embed (controls: none) — scale the 16:9 player to cover the box. */
.ibb-profile__media--embed-cover .ibb-profile__embed iframe {
	top: 50%;
	left: 50%;
	width: max(100%, 100cqh * 16 / 9);
	height: max(100%, 100cqw * 9 / 16);
	transform: translate(-50%, -50%);
	pointer-events: none;
}

/* ---- Custom video controls -------------------------------------------- */
.ibb-vctrl {
	position: absolute;
	right: 14px;
	bottom: 14px;
	z-index: 2;
	display: flex;
	gap: 8px;
	transition: opacity .25s ease;
}
.ibb-vctrl[hidden] { display: none; }
.ibb-profile .ibb-vbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(255,255,255,.28);
	border-radius: 50%;
	background: rgba(0,0,0,.55);
	-webkit-backdrop-filter: blur(6px);
	        backdrop-filter: blur(6px);
	color: #fff;
	line-height: 1;
	cursor: pointer;
	box-shadow: none;
	transition: background-color .2s ease, transform .2s ease, border-color .2s ease;
	-webkit-tap-highlight-color: transparent;
}
.ibb-profile .ibb-vbtn::before,
.ibb-profile .ibb-vbtn::after { display: none; }
.ibb-profile .ibb-vbtn:hover { background: var(--ibb-p-role); border-color: var(--ibb-p-role); }
.ibb-profile .ibb-vbtn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.ibb-vbtn__i { width: 20px; height: 20px; fill: currentColor; }
.ibb-vbtn__i--pause,
.ibb-vbtn__i--sound,
.is-playing .ibb-vbtn__i--play,
.ibb-profile__media:not(.is-muted) .ibb-vbtn__i--muted { display: none; }
.is-playing .ibb-vbtn__i--pause,
.ibb-profile__media:not(.is-muted) .ibb-vbtn__i--sound { display: block; }

/* "Tap for sound" hint when sound was wanted but the browser started it muted. */
.ibb-vhint {
	display: none;
	align-self: center;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(0,0,0,.6);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	color: #fff;
	white-space: nowrap;
	pointer-events: none;
}
.needs-sound .ibb-vhint { display: inline-block; }
.needs-sound .ibb-vctrl { opacity: 1 !important; }

/* Paused / autoplay blocked: big centred play button over the poster. */
.ibb-profile__media.ibb-js:not(.is-playing) .ibb-vctrl {
	inset: 0;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}
.ibb-profile__media.ibb-js:not(.is-playing) .ibb-vbtn--sound,
.ibb-profile__media.ibb-js:not(.is-playing) .ibb-vhint { display: none; }
.ibb-profile__media.ibb-js:not(.is-playing) .ibb-vbtn--play {
	width: 76px;
	height: 76px;
	pointer-events: auto;
	background: var(--ibb-p-role);
	border-color: transparent;
	box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.ibb-profile__media.ibb-js:not(.is-playing) .ibb-vbtn--play .ibb-vbtn__i { width: 30px; height: 30px; margin-left: 3px; }
.ibb-profile__media.ibb-js:not(.is-playing) .ibb-vbtn--play:hover { transform: scale(1.06); }

/* Mouse users: controls fade in on hover/focus while playing. Touch: always visible. */
@media (hover: hover) and (pointer: fine) {
	.ibb-profile__media.is-playing .ibb-vctrl { opacity: 0; }
	.ibb-profile__media.is-playing:hover .ibb-vctrl,
	.ibb-profile__media.is-playing:focus-within .ibb-vctrl { opacity: 1; }
}
@media (hover: none), (pointer: coarse) {
	.ibb-profile .ibb-vbtn { width: 44px; height: 44px; } /* Apple/Google minimum touch target */
}

/* ---- Text ------------------------------------------------------------ */
.ibb-profile__body {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	padding: var(--ibb-p-pad);
}
.ibb-profile--has-hl .ibb-profile__body { padding-right: var(--ibb-p-hl-space); }
.ibb-profile__body > *:not(.ibb-profile__highlight) { position: relative; z-index: 1; }

.ibb-profile .ibb-profile__name {
	margin: 0 0 18px;
	padding: 0;
	font-family: inherit;
	font-size: 42px;
	font-weight: 900;
	line-height: 1.055;
	letter-spacing: .02em;
	text-transform: none;
	color: var(--ibb-p-name);
}

.ibb-profile .ibb-profile__role {
	margin: 0 0 30px;
	padding: 0;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.9;
	letter-spacing: .04em;
	color: var(--ibb-p-role);
}

.ibb-profile .ibb-profile__rows {
	margin: 0;
	padding: 0;
	list-style: none;
}
.ibb-profile .ibb-profile__row {
	margin: 0 0 8px;
	padding: 0;
	list-style: none;
	font-size: 16px;
	line-height: 1.9;
	color: var(--ibb-p-label);
	overflow-wrap: anywhere;
}
.ibb-profile .ibb-profile__row::before,
.ibb-profile .ibb-profile__row::marker { content: none; display: none; }
.ibb-profile .ibb-profile__label {
	margin-right: .5em;
	font-size: 18px;
	font-weight: 500;
	color: var(--ibb-p-label);
}
.ibb-profile .ibb-profile__value {
	font-size: 16px;
	font-weight: 400;
	color: var(--ibb-p-value);
	text-decoration: none;
	transition: color .2s ease;
}
.ibb-profile a.ibb-profile__value:hover,
.ibb-profile a.ibb-profile__value:focus-visible { color: var(--ibb-p-name); text-decoration: underline; text-underline-offset: 3px; }

.ibb-profile .ibb-profile__bio {
	margin-top: 20px;
	font-size: 16px;
	line-height: 1.75;
	color: var(--ibb-p-value);
}
.ibb-profile .ibb-profile__bio p { margin: 0 0 .8em; color: inherit; }
.ibb-profile .ibb-profile__bio p:last-child { margin-bottom: 0; }

/* ---- Vertical highlight word ("Team Leader") --------------------------- */
.ibb-profile__highlight {
	position: absolute;
	right: 30px;
	bottom: 50px;
	z-index: 0;
	margin: 0;
	font-family: "Saira Stencil One", "Red Hat Display", sans-serif;
	font-size: var(--ibb-p-hl-size);
	font-weight: 400;
	line-height: .9;
	letter-spacing: .02em;
	white-space: nowrap;
	color: var(--ibb-p-hl);
	opacity: var(--ibb-p-hl-opacity);
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	pointer-events: none;
	user-select: none;
}
.ibb-profile__highlight span {
	display: inline-block;
	-webkit-mask-image: url(../img/grunge-mask.svg);
	        mask-image: url(../img/grunge-mask.svg);
	-webkit-mask-size: 400px 400px;
	        mask-size: 400px 400px;
	-webkit-mask-repeat: repeat;
	        mask-repeat: repeat;
}
.ibb-profile--no-texture .ibb-profile__highlight span { -webkit-mask-image: none; mask-image: none; }

/* ---- Medium width (tablet, or a wide column) ------------------------- */
@container ibb-profile (max-width: 1024px) {
	.ibb-profile__inner {
		--ibb-p-pad: 44px 40px 36px;
		--ibb-p-hl-size: 72px;
		--ibb-p-hl-space: 160px;
		--ibb-p-img-w: 42%;
	}
	.ibb-profile .ibb-profile__name { font-size: 34px; }
	.ibb-profile__highlight { right: 20px; bottom: 36px; }
}

/* ---- Narrow (phones, sidebars, 2-up columns): stack and centre --------- */
@container ibb-profile (max-width: 700px) {
	.ibb-profile__inner,
	.ibb-profile--img-right .ibb-profile__inner {
		--ibb-p-pad: 32px 22px 40px;
		--ibb-p-hl-size: 54px;
		flex-direction: column;
		min-height: 0;
		text-align: center;
	}
	.ibb-profile__media {
		flex: none;
		width: 100%;
		max-width: 100%;
		aspect-ratio: var(--ibb-p-ratio, 500 / 440);
	}
	.ibb-profile--has-hl .ibb-profile__body { padding-right: 22px; }
	.ibb-profile .ibb-profile__name { font-size: 32px; }
	.ibb-profile .ibb-profile__role { margin-bottom: 20px; }
	.ibb-profile .ibb-profile__label { display: block; margin-right: 0; line-height: 1.5; }
	.ibb-profile .ibb-profile__row { margin-bottom: 14px; }
	.ibb-profile__highlight {
		position: static;
		margin-top: 22px;
		writing-mode: horizontal-tb;
		transform: none;
		white-space: normal;
	}
	.ibb-profile--hl-hide-mobile .ibb-profile__highlight { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.ibb-profile .ibb-profile__value,
	.ibb-profile .ibb-vbtn,
	.ibb-vctrl { transition: none; }
}
