/*
 * Improv in the Workplace sections (inc/workplace.php): [up_quotes], [up_tiles], [up_logos] and
 * the [up_inquiry_form] band. Builds on sections.css and the design-system tokens.
 */

.up-ds .up-section__intro {
	max-width: 720px;
	margin: -8px 0 0;
	padding: 0;
	font-size: 19px;
	line-height: 1.5;
	color: var(--up-gray);
}

/* ---- Quotes -------------------------------------------------------------- */

.up-ds ul.up-quotes__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 18px;
}

.up-ds.up-quotes--large ul.up-quotes__list {
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.up-ds.up-quotes--grid ul.up-quotes__list {
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.up-ds .up-quote {
	list-style: none;
	margin: 0;
}

.up-ds .up-quote figure {
	height: 100%;
	margin: 0;
	padding: 28px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	border-radius: var(--up-radius-card);
	background: var(--up-blush);
}

.up-ds.up-quotes--grid .up-quote figure {
	padding: 22px;
	background: var(--up-butter);
	border-radius: var(--up-radius-tile);
}

.up-ds .up-quote__text {
	position: relative;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	quotes: "“" "”";
}

/* Salient styles blockquote in its own way; these win inside the design system. */
html body .up-ds .up-quote__text p {
	margin: 0;
	padding: 0;
	font-family: var(--up-font-body);
	font-size: 21px;
	font-weight: 500;
	line-height: 1.45;
	letter-spacing: 0;
	color: var(--up-black);
}

html body .up-ds.up-quotes--grid .up-quote__text p {
	font-size: 17px;
	font-weight: 400;
}

.up-ds .up-quote__text p::before {
	content: open-quote;
}

.up-ds .up-quote__text p::after {
	content: close-quote;
}

.up-ds.up-quotes--large .up-quote__text::before {
	content: "“";
	display: block;
	height: 40px;
	font-family: var(--up-font-display);
	font-size: 72px;
	line-height: 1;
	color: var(--up-red);
}

.up-ds.up-quotes--large .up-quote__text p::before {
	content: none;
}

.up-ds .up-quote__by {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 16px;
	line-height: 1.35;
}

.up-ds .up-quote__name {
	font-weight: 700;
}

.up-ds .up-quote__source {
	color: var(--up-gray);
}

.up-ds .up-quotes__more {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.up-ds .up-quotes__more > summary {
	align-self: flex-start;
	cursor: pointer;
	list-style: none;
}

.up-ds .up-quotes__more > summary::-webkit-details-marker {
	display: none;
}

.up-ds .up-quotes__more > summary::after {
	content: "+";
	margin-left: 10px;
	font-weight: 700;
}

.up-ds .up-quotes__more[open] > summary::after {
	content: "−";
}

.up-ds .up-quotes__more[open] > summary {
	margin-bottom: 18px;
}

/* ---- Info tiles ---------------------------------------------------------- */

.up-ds ul.up-tiles__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 14px;
}

.up-ds .up-tiles__list > li {
	list-style: none;
	margin: 0;
	padding: 22px;
}

.up-ds a.up-tiles__link {
	color: var(--up-link);
	font-weight: 600;
}

/* ---- Logos --------------------------------------------------------------- */

.up-ds ul.up-logos__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: 12px;
}

.up-ds .up-logos__list > li {
	list-style: none;
	margin: 0;
	height: 92px;
	padding: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--up-white);
	border: 1px solid #e6e6e6;
	border-radius: var(--up-radius-tile);
}

.up-ds .up-logos__img {
	max-width: 100%;
	max-height: 60px;
	width: auto;
	height: auto;
	object-fit: contain;
	filter: grayscale(1);
	opacity: 0.85;
	transition: filter 0.2s, opacity 0.2s;
}

.up-ds .up-logos__list > li:hover .up-logos__img {
	filter: none;
	opacity: 1;
}

/* ---- Inquiry band and form ----------------------------------------------- */

.up-ds.up-inquiry {
	margin-top: 40px;
	padding-top: 64px;
	padding-bottom: 64px;
	background: var(--up-red);
	color: var(--up-white);
	scroll-margin-top: 80px;
}

.up-inquiry__inner {
	max-width: var(--up-content);
	margin: 0 auto;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
	gap: 40px;
	align-items: start;
}

.up-inquiry__words {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

html body .up-ds.up-inquiry .up-h2 {
	color: var(--up-white);
}

.up-ds.up-inquiry .up-script {
	color: var(--up-yellow);
}

.up-ds .up-inquiry__text {
	margin: 0;
	padding: 0;
	font-size: 19px;
	line-height: 1.5;
	color: var(--up-white);
}

.up-ds.up-inquiry .up-inquiry__words a {
	color: var(--up-white);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
	overflow-wrap: anywhere;
}

.up-ds.up-inquiry :focus-visible {
	outline-color: var(--up-yellow);
}

.up-ds .up-inquiry__card {
	padding: 30px;
	background: var(--up-white);
	color: var(--up-black);
	border-radius: var(--up-radius-card);
	box-shadow: var(--up-shadow-card);
}

.up-ds .up-inquiry__card :focus-visible {
	outline-color: var(--up-black);
}

.up-ds .up-form {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.up-ds .up-form__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.up-ds .up-form__field {
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.up-ds .up-form label,
.up-ds .up-form legend {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--up-black);
}

.up-ds .up-form__req {
	color: var(--up-red);
}

/* Salient restyles form controls site-wide; "html body" keeps these. */
html body .up-ds .up-form input[type="text"],
html body .up-ds .up-form input[type="email"],
html body .up-ds .up-form input[type="tel"],
html body .up-ds .up-form select,
html body .up-ds .up-form textarea {
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 10px 14px;
	font-family: var(--up-font-body);
	font-size: 17px;
	line-height: 1.4;
	color: var(--up-black);
	background: var(--up-white);
	border: 2px solid var(--up-black);
	border-radius: 10px;
	box-shadow: none;
}

html body .up-ds .up-form textarea {
	min-height: 130px;
	resize: vertical;
}

html body .up-ds .up-form [aria-invalid="true"] {
	border-color: var(--up-red);
	background: #fff5f6;
}

.up-ds .up-form__error {
	font-size: 15px;
	font-weight: 600;
	color: var(--up-red);
}

.up-ds .up-form__alert {
	padding: 14px 16px;
	border-radius: 10px;
	background: var(--up-blush);
	font-weight: 600;
}

.up-ds .up-form__choices {
	margin: 0;
	padding: 0;
	border: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.up-ds .up-form__choices--where {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.up-ds .up-form__choices legend {
	margin-bottom: 10px;
	padding: 0;
	grid-column: 1 / -1;
}

.up-ds .up-form label.up-form__choice {
	min-height: 48px;
	padding: 10px 14px;
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--up-butter);
	border: 2px solid transparent;
	border-radius: 12px;
	font-weight: 500;
	cursor: pointer;
}

.up-ds .up-form label.up-form__choice:has(input:checked) {
	border-color: var(--up-black);
	background: var(--up-yellow);
}

html body .up-ds .up-form__choice input {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--up-red);
}

/* The field people never see (spam trap). */
.up-ds .up-form__trap {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.up-ds .up-form__submit {
	margin: 0;
}

.up-ds .up-form__thanks {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.up-ds .up-form__thanks p {
	margin: 0;
	font-size: 18px;
}

/* Flash a choice ticked by a button elsewhere on the page. */
.up-ds .up-form__choice.is-flash {
	animation: up-flash 1.2s ease-out;
}

@keyframes up-flash {
	from { box-shadow: 0 0 0 6px var(--up-yellow); }
	to { box-shadow: 0 0 0 0 transparent; }
}

/* ---- Phones -------------------------------------------------------------- */

@media (max-width: 800px) {
	.up-inquiry__inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}
}

@media (max-width: 600px) {
	.up-ds.up-inquiry {
		padding-top: 44px;
		padding-bottom: 44px;
	}

	.up-ds .up-inquiry__card {
		padding: 22px 18px;
	}

	.up-ds .up-form__grid,
	.up-ds .up-form__choices,
	.up-ds .up-form__choices--where {
		grid-template-columns: minmax(0, 1fr);
	}

	.up-ds .up-form__submit .up-btn {
		width: 100%;
	}

	.up-ds .up-quote figure {
		padding: 22px;
	}

	html body .up-ds .up-quote__text p {
		font-size: 19px;
	}

	.up-ds ul.up-logos__list {
		grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	}

	.up-ds .up-logos__list > li {
		height: 76px;
		padding: 10px;
	}
}
