/*
 * SECTION STYLE: CONTACT FORM (a global section).
 *
 * The design of the home page: a dark band (#151515) with the small
 * label, the heading, the intro and the contact details on the left,
 * and the form on the right.
 *
 * Measures from the design frame (1440), relative to the top of the
 * band:
 *   101  the label          187  the first field row
 *   243  the heading        295  the second field row
 *   316  the intro          386  the message
 *   466  the email          501  the consent
 *   529  the phone          584  the send button
 * The band is 688 px tall.
 */

/* ==================================================================
 * The band
 * ================================================================== */

.aitio-contact {
	background: var(--aitio-dark);
	color: var(--aitio-white);
	padding: 101px 0 69px;
}

.aitio-contact__inner {
	display: grid;
	grid-template-columns: 300px minmax(0, 1fr);
	gap: 76px;
	max-width: var(--aitio-col-panel);
}

/* ---- the left column ---------------------------------------------- */

.aitio-contact__label {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	margin: 0 0 95px;
	color: var(--aitio-white);
	font-size: 15.59px;
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: 0;
}

.aitio-contact__line--mark {
	background: var(--aitio-yellow);
	color: var(--aitio-dark);
	padding: 0 2px;
}

.aitio-contact__heading {
	margin: 0;
	color: var(--aitio-pure-white);
	font-size: 36px;
	font-weight: 400;
	line-height: 1.25;
	letter-spacing: -0.025em;
}

.aitio-contact__intro {
	margin: 28px 0 0;
	max-width: 180px;
	color: var(--aitio-muted);
	font-size: 13px;
	font-weight: 400;
	line-height: 21px;
	letter-spacing: 0;
}

.aitio-contact__details {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
	margin-top: 102px;
}

.aitio-contact__link {
	color: var(--aitio-white);
	font-size: 22px;
	font-weight: 400;
	line-height: 1.35;
	letter-spacing: 0;
	text-decoration: none;
	border-bottom: 1px solid rgba(249, 249, 249, 0.75);
	padding-bottom: 8px;
}

.aitio-contact__link:hover {
	border-bottom-color: var(--aitio-yellow);
}

/* ==================================================================
 * The form
 * ================================================================== */

.aitio-contact__form .aitio-form {
	color: var(--aitio-white);
}

.aitio-form__row {
	margin: 0 0 36px;
}

/* The first row of the form starts lower than the label (design). */
.aitio-form__row--names {
	display: grid;
	grid-template-columns: 198px 197px minmax(0, 1fr);
	gap: 18px;
	margin-top: 86px;
	margin-bottom: 72px;
}

.aitio-form__row--second {
	display: grid;
	grid-template-columns: 305px minmax(0, 1fr);
	gap: 20px;
	margin-bottom: 72px;
}

/* ---- the fields (the label sits on the line, like the design) ------ */

.aitio-form__field {
	position: relative;
	display: block;
	margin: 0;
}

.aitio-form__field label {
	position: absolute;
	left: 0;
	top: 0;
	margin: 0;
	color: var(--aitio-pure-white);
	font-size: 22px;
	font-weight: 400;
	line-height: 24px;
	letter-spacing: 0.01em;
	pointer-events: none;
	transition: transform 0.18s ease, font-size 0.18s ease;
}

.aitio-contact__form .aitio-input {
	border: 0;
	border-bottom: 1px solid rgba(249, 249, 249, 0.55);
	border-radius: 0;
	background: transparent;
	color: var(--aitio-white);
	padding: 0 0 8px;
	font-size: 16px;
	line-height: 1.4;
}

.aitio-contact__form .aitio-input:focus {
	outline: none;
	border-bottom-color: var(--aitio-yellow);
	box-shadow: none;
}

/* Browsers paint autofilled fields with their own pale blue and
 * dark ink. The contact band is dark, so we paint the same dark
 * colour back over that fill. The visitor sees the same field as
 * when they type it by hand. */
.aitio-contact__form .aitio-input:-webkit-autofill,
.aitio-contact__form .aitio-input:-webkit-autofill:hover,
.aitio-contact__form .aitio-input:-webkit-autofill:focus,
.aitio-contact__form .aitio-input:-webkit-autofill:active,
.aitio-contact__form .aitio-input:autofill {
	-webkit-box-shadow: 0 0 0 1000px var(--aitio-dark) inset;
	box-shadow: 0 0 0 1000px var(--aitio-dark) inset;
	-webkit-text-fill-color: var(--aitio-white);
	caret-color: var(--aitio-white);
	transition: background-color 600000s 0s, color 600000s 0s;
}

.aitio-form__field .aitio-input {
	height: 36px;
	padding: 12px 0 0;
}

/* When the visitor types, the label moves up and gets smaller. */
.aitio-form__field .aitio-input:focus + label,
.aitio-form__field .aitio-input:not(:placeholder-shown) + label {
	transform: translateY(-12px) scale(0.72);
	transform-origin: left top;
}

/* ---- the files row -------------------------------------------------- */

.aitio-form__files {
	position: relative;
	display: flex;
	flex-wrap: nowrap;
	align-items: flex-start;
	gap: 16px;
	height: 36px;
	padding-bottom: 0;
	border-bottom: 1px solid rgba(249, 249, 249, 0.55);
}
.aitio-page-contact .aitio-form__files{
		height: 44px !important;
	}

.aitio-form__files-label {
	position: relative;
	z-index: 0;
	color: var(--aitio-pure-white);
	font-size: 22px;
	font-weight: 400;
	line-height: 24px;
	letter-spacing: 0.01em;
	white-space: nowrap;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* The pill is taller than the field line, so it floats just above it. */
.aitio-form__browse {
	position: relative;
	z-index: 2;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 165px;
	height: 36px;
	margin-top: -12px;
	margin-right: 18px;
	margin-left: auto;
	padding: 0 14px;
	border: 1px solid rgba(249, 249, 249, 0.75);
	border-radius: 999px;
	background: transparent;
	color: var(--aitio-white);
	font-size: 10px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.aitio-form__browse:hover {
	border-color: var(--aitio-yellow);
	color: var(--aitio-yellow);
}

.aitio-form__browse:focus-visible {
	outline: 2px solid var(--aitio-yellow);
	outline-offset: 3px;
}

/* The drop area covers the whole row, so files can be dropped on it.
   The "browse" button stays on top and can be clicked. */
.aitio-form__files .aitio-drop {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: auto;
	height: auto;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	text-align: left;
}

.aitio-form__files .aitio-drop.is-over {
	background: rgba(255, 255, 5, 0.08);
	border: 0;
	outline: none;
}

/* The real file box never renders (hidden attribute); the button opens it. */
.aitio-form__files .aitio-drop__input,
.aitio-drop__input {
	display: none;
}

/* ---- the message ---------------------------------------------------- */

/* ---- the message ---------------------------------------------------- */

.aitio-form__field--message {
	margin-top: 0;
	margin-bottom: 62px;
}

.aitio-form__field--message .aitio-input {
	display: block;
	height: 36px;
	min-height: 36px;
	resize: none;
	overflow: hidden;
}

/* ---- the consent ----------------------------------------------------- */

.aitio-consent {
	display: flex;
	flex-direction: column;
	margin: 0 0 20px;
}

.aitio-form__row .aitio-consent__label {
	display: flex;
	gap: 12px;
	align-items: center;
	margin: 0;
	font-weight: 400;
	font-size: 13px;
	line-height: 21px;
	color: var(--aitio-muted);
	cursor: pointer;
}

/* The design shows a small empty square (14 x 14, one pixel of grey). */
.aitio-consent__label input {
	-webkit-appearance: none;
	appearance: none;
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
	margin: 0;
	border: 1px solid var(--aitio-muted);
	border-radius: 0;
	background: transparent;
	cursor: pointer;
}

.aitio-consent__label input:checked {
	border-color: var(--aitio-yellow);
	background-color: var(--aitio-yellow);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.4l3 3 6-6.6' fill='none' stroke='%23151515' stroke-width='1.8' stroke-linecap='square'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 14px 14px;
}

.aitio-consent__label input:focus-visible {
	outline: 2px solid var(--aitio-yellow);
	outline-offset: 2px;
}

.aitio-consent__label a {
	color: var(--aitio-muted);
	text-decoration: underline;
}

/* ---- the send button -------------------------------------------------- */

.aitio-form__row--submit {
	margin: 0;
	line-height: 0;
}

.aitio-contact__form .aitio-btn--light {
	background: var(--aitio-white);
	color: var(--aitio-dark);
}

.aitio-contact__form .aitio-btn--light:hover {
	background: var(--aitio-yellow);
}

/* -- small error text under a field -------------------------------- */
.aitio-field__error {
	display: block;
	margin-top: 6px;
	color: #ff9a8a;
	font-size: 13.5px;
	font-weight: 600;
}

.aitio-field__error[hidden] {
	display: none;
}

/* -- interest chips ------------------------------------------------- */
.aitio-interests {
	margin-bottom: 18px;
}

.aitio-interests__label {
	display: block;
	font-weight: 600;
	font-size: 14.5px;
	margin-bottom: 7px;
}

.aitio-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.aitio-chip {
	border: 1px solid rgba(249, 249, 249, 0.55);
	background: transparent;
	border-radius: 999px;
	padding: 8px 18px;
	font: inherit;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--aitio-white);
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.aitio-chip:hover {
	border-color: var(--aitio-white);
}

.aitio-chip[aria-pressed="true"] {
	background: var(--aitio-yellow);
	border-color: var(--aitio-yellow);
	color: var(--aitio-dark);
}

.aitio-chip:focus-visible {
	outline: 2px solid var(--aitio-yellow);
	outline-offset: 2px;
}

/* -- uploaded file rows + progress bars ------------------------------ */
.aitio-filelist {
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
	width: 100%;
}

/* In the contact row the list must not push the field line down. */
.aitio-form__files .aitio-filelist {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 3;
	width: 100%;
	margin-top: 4px;
}

.aitio-file {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 2px 11px;
	font-size: 14px;
	border-bottom: 1px solid rgba(249, 249, 249, 0.25);
}

.aitio-file__name {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 600;
}

.aitio-file__state {
	flex: 0 0 auto;
	color: rgba(249, 249, 249, 0.7);
	font-size: 12.5px;
}

.aitio-file.is-done .aitio-file__state {
	color: #b6e08a;
	font-weight: 700;
}

.aitio-file.is-failed .aitio-file__state:before {
	content: "\2715";
	color: #ff9a8a;
	font-weight: 700;
}

.aitio-file__remove {
	flex: 0 0 auto;
	border: 0;
	background: transparent;
	font-size: 18px;
	line-height: 1;
	color: rgba(249, 249, 249, 0.7);
	cursor: pointer;
	padding: 2px 6px;
}

.aitio-file__remove:hover {
	color: var(--aitio-white);
}

.aitio-file__bar {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background: rgba(249, 249, 249, 0.25);
	overflow: hidden;
}

.aitio-file__bar i {
	display: block;
	height: 100%;
	width: 0;
	background: var(--aitio-yellow);
	transition: width 0.15s linear;
}

.aitio-file.is-done .aitio-file__bar {
	opacity: 0;
}

/* -- the failure box (content always stays) --------------------------- */
.aitio-form__failure {
	border-radius: var(--aitio-radius-sm);
	background: #3a1d18;
	color: #ffb3a6;
	padding: 16px 18px;
	margin-top: 22px;
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}

.aitio-form__failure p {
	margin: 0;
	font-weight: 600;
}

/* -- the "MESSAGE RECEIVED" box --------------------------------------- */
.aitio-form__sent {
	border: 1px solid rgba(249, 249, 249, 0.25);
	border-radius: var(--aitio-radius);
	padding: clamp(24px, 4vw, 40px);
	background: rgba(249, 249, 249, 0.06);
	color: var(--aitio-white);
}

.aitio-sent__title {
	display: flex;
	align-items: center;
	gap: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	font-size: 14px;
	margin: 0 0 18px;
}

.aitio-sent__check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--aitio-yellow);
	color: var(--aitio-dark);
	font-size: 15px;
	font-weight: 700;
}

.aitio-sent__thanks {
	font-size: clamp(26px, 3.4vw, 38px);
	font-weight: 400;
	line-height: 1.15;
	margin: 0 0 10px;
}

.aitio-sent__promise {
	color: rgba(249, 249, 249, 0.85);
	font-size: 15.5px;
	max-width: 46ch;
	margin: 0 0 22px;
}

.aitio-sent__from {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	border-top: 1px solid rgba(249, 249, 249, 0.25);
	padding-top: 16px;
	font-size: 14px;
}

.aitio-sent__label {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 11.5px;
	font-weight: 700;
	color: rgba(249, 249, 249, 0.7);
}

.aitio-sent__attach {
	color: rgba(249, 249, 249, 0.85);
}

.aitio-sent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 26px 0 0;
}

.aitio-form .aitio-btn[data-busy="1"] {
	opacity: 0.9;
	cursor: progress;
}

.aitio-form .aitio-btn[data-busy="1"]::before {
	position: absolute;
	top: 50%;
	right: 13px;
	z-index: 3;
	width: 13px;
	height: 13px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	content: "";
	transform: translateY(-50%);
	animation: aitio-form-spin 0.7s linear infinite;
}

.aitio-form .aitio-btn[data-busy="1"]::after {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 23px 0 10px;
	border-radius: inherit;
	background: inherit;
	color: inherit;
	content: attr(data-wait);
	font: inherit;
	text-transform: inherit;
}

@keyframes aitio-form-spin {
	to {
		transform: translateY(-50%) rotate(360deg);
	}
}

/* The same confirmation layout is used by the Home and Contact forms. */
.aitio-form__sent--contact {
	border: 0;
	border-radius: 0;
	padding: 0;
	background: transparent;
}

.aitio-sent__eyebrow {
	display: table;
	margin: 0;
	padding: 3px 8px;
	background: var(--aitio-yellow);
	color: var(--aitio-dark);
	font-size: 14px;
	line-height: 1.2;
}

.aitio-sent__greeting {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 40px;
}

.aitio-sent__greeting .aitio-sent__check {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	font-size: 27px;
	font-weight: 400;
}

.aitio-sent__greeting .aitio-sent__thanks {
	margin: 0;
	font-size: clamp(26px, 3vw, 36px);
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.04em;
}

.aitio-sent__promise {
	margin-top: 30px;
}

.aitio-sent__from--contact {
	display: block;
	margin-top: 36px;
	padding: 0;
	border: 0;
	font-size: inherit;
}

.aitio-sent__from--contact .aitio-sent__label {
	display: block;
	margin-bottom: 12px;
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 0;
}

.aitio-sent__from-items {
	display: grid;
	grid-template-columns: minmax(0, 196px) minmax(0, 263px) minmax(0, 1fr);
	gap: 20px;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(249, 249, 249, 0.65);
	font-size: 24px;
	line-height: 1.25;
}

.aitio-sent__meanwhile {
	margin: 48px 0 0;
	font-size: 14px;
	line-height: 1.5;
}

.aitio-sent__actions--contact {
	align-items: center;
	gap: 42px;
	margin-top: 48px;
}

.aitio-sent__work {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
	min-width: 163px;
	height: 35px;
	padding: 0 16px;
	border-radius: 999px;
	background: var(--aitio-white);
	color: var(--aitio-dark);
	font-size: 12px;
	text-decoration: none;
	text-transform: uppercase;
}

.aitio-sent__work .aitio-btn__track {
	gap: 16px;
}

.aitio-sent__work .aitio-btn__label {
	font-size: 12px;
}

.aitio-sent__again {
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--aitio-white);
	font-size: 12px;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* A "quiet" button used next to the main one. */
.aitio-button--ghost {
	background: transparent;
	color: var(--aitio-white);
	border: 1px solid rgba(249, 249, 249, 0.75);
}

.aitio-button--ghost:hover {
	background: var(--aitio-white);
	color: var(--aitio-dark);
}

/* -- small screens ------------------------------------------------------ */
@media (max-width: 1100px) {

	.aitio-contact {
		padding: 72px 0 60px;
	}

	.aitio-contact__inner {
		grid-template-columns: 1fr;
		gap: 48px;
	}

	.aitio-contact__heading {
		white-space: normal;
	}
	.aitio-contact__intro {
		max-width: 34ch;
	}

	.aitio-contact__details {
		margin-top: 40px;
	}

	.aitio-form__row--names,
	.aitio-form__row--second {
		grid-template-columns: 1fr 1fr;
		gap: 32px 24px;
	}

	.aitio-form__row--names {
		margin-top: 0;
	}
}

@media (max-width: 720px) {

	.aitio-form__row--names,
	.aitio-form__row--second {
		grid-template-columns: 1fr;
	}

	.aitio-form__files {
		flex-wrap: wrap;
		height: auto;
		padding-bottom: 8px;
	}

	.aitio-sent__from {
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
	}

	.aitio-sent__from-items {
		grid-template-columns: 1fr;
		gap: 8px;
		font-size: 20px;
	}

	.aitio-sent__greeting {
		gap: 12px;
		margin-top: 28px;
	}

	.aitio-sent__greeting .aitio-sent__check {
		flex-basis: 40px;
		width: 40px;
		height: 40px;
	}

	.aitio-sent__greeting .aitio-sent__thanks {
		font-size: 26px;
	}

	.aitio-sent__actions--contact {
		flex-direction: column;
		align-items: flex-start;
		gap: 20px;
		margin-top: 32px;
	}

	.aitio-sent__actions .aitio-button {
		width: 100%;
		text-align: center;
	}
}

/* -- people who prefer less movement ------------------------------------ */
@media (prefers-reduced-motion: reduce) {
	.aitio-chip,
	.aitio-form__browse,
	.aitio-form__field label,
	.aitio-file__bar i {
		transition: none;
	}

	.aitio-form .aitio-btn[data-busy="1"]::before {
		animation: none;
		border-right-color: currentColor;
	}
}
