/**
 * Team member modal ("clean split" — exploration v1, no profile link).
 * Cards on /team/ become buttons that open one shared modal, populated
 * from each card's data-attributes. Scoped to .lto-tm* + the
 * .lto-team-card--modal card variant. Colours mirror theme.json.
 */

/* Make the existing team card a real, tappable button without losing its look. */
.lto-team-card--modal {
	-webkit-appearance: none; appearance: none;
	background: none; border: 0; margin: 0; padding: 0;
	font: inherit; text-align: left; width: 100%; cursor: pointer;
}
.lto-team-card--modal .lto-team-card__image-wrap { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.lto-team-card--modal:hover .lto-team-card__image-wrap { transform: translateY(-4px); box-shadow: 0 18px 38px rgba(10,19,36,0.15); }
.lto-team-card--modal .lto-team-card__name { transition: color 0.18s ease; }
.lto-team-card--modal:hover .lto-team-card__name { color: var(--wp--preset--color--coral, #fc7957); }
.lto-team-card--modal:focus-visible { outline: 2px solid var(--wp--preset--color--coral, #fc7957); outline-offset: 4px; border-radius: 12px; }

/* Overlay */
.lto-tm {
	position: fixed; inset: 0; z-index: 1000;
	display: flex; align-items: center; justify-content: center; padding: 24px;
	opacity: 0; visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}
.lto-tm.is-open { opacity: 1; visibility: visible; }
.lto-tm__backdrop { position: absolute; inset: 0; background: rgba(10,19,36,0.62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }

.lto-tm__dialog {
	position: relative; z-index: 1; width: 100%; max-width: 760px;
	background: #fff; border-radius: 20px; overflow: hidden;
	display: grid; grid-template-columns: 300px 1fr;
	box-shadow: 0 40px 100px -30px rgba(0,0,0,0.6); max-height: 90vh;
	transform: translateY(16px) scale(0.98);
	transition: transform 0.28s cubic-bezier(.2,.7,.3,1);
}
.lto-tm.is-open .lto-tm__dialog { transform: none; }

.lto-tm__media { position: relative; background: var(--wp--preset--color--blue-100, #daf5f2); }
.lto-tm__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.lto-tm__body { padding: 40px; overflow-y: auto; }
.lto-tm__role { font-family: var(--wp--preset--font-family--montserrat, sans-serif); font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wp--preset--color--blue-700, #215988); margin: 0; }
.lto-tm__name { font-family: var(--wp--preset--font-family--alice, Georgia, serif); font-size: clamp(28px, 3.4vw, 36px); line-height: 1.12; color: var(--wp--preset--color--navy-900, #0a1324); margin: 8px 0 4px; }
.lto-tm__loc { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #6a7484; margin: 0 0 18px; }
.lto-tm__loc svg { width: 14px; height: 14px; color: var(--wp--preset--color--coral, #fc7957); flex-shrink: 0; }
.lto-tm__divider { height: 2px; width: 44px; background: var(--wp--preset--color--coral, #fc7957); border-radius: 2px; margin: 0 0 18px; }
.lto-tm__excerpt { font-family: var(--wp--preset--font-family--montserrat, sans-serif); font-size: 15.5px; line-height: 1.75; color: #3d4657; margin: 0; }

.lto-tm__close {
	position: absolute; top: 14px; right: 14px; z-index: 2;
	width: 38px; height: 38px; border-radius: 50%; border: none;
	background: rgba(255,255,255,0.92); color: var(--wp--preset--color--navy-900, #0a1324);
	cursor: pointer; display: flex; align-items: center; justify-content: center;
	box-shadow: 0 4px 14px rgba(0,0,0,0.15); transition: background 0.18s ease, color 0.18s ease;
}
.lto-tm__close:hover { background: var(--wp--preset--color--coral, #fc7957); color: #fff; }
.lto-tm__close svg { width: 18px; height: 18px; }

body.lto-tm-lock { overflow: hidden; }

@media (max-width: 620px) {
	.lto-tm__dialog { grid-template-columns: 1fr; max-height: 92vh; }
	.lto-tm__media { aspect-ratio: 16 / 10; }
	.lto-tm__body { padding: 28px 26px; }
}
@media (prefers-reduced-motion: reduce) {
	.lto-tm, .lto-tm__dialog { transition: none; }
}
