.contact {
    position: relative;
    overflow: hidden;
    padding: 100px 0;
    background: #040A1B;
	font-family: 'Montserrat', sans-serif;
}

/* Green light leaking past the card: bottom-left and top-right. */
.contact::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(99.98deg, rgba(2, 6, 23, 0.6) 6.61%, rgba(53, 92, 11, 0.6) 17.37%, rgba(155, 197, 16, 0.6) 27.08%, rgba(53, 92, 11, 0.6) 37.23%, rgba(2, 6, 23, 0.6) 47.55%), #040A1B;
	pointer-events: none;
}

.contact .container {
	position: relative;
	z-index: 1;
}

.contact__card {
	position: relative;
    overflow: hidden;
    padding: 60px;
    border-radius: 20px;
    background: #F8FAFC;
    box-shadow: 0px 0px 15px 0px #1E293B1A;
}

/* Content column - the rest of the card is left to the image. */
.contact__inner {
	position: relative;
	z-index: 1;
	max-width: 973px;
}

.contact__heading {
    max-width: 700px;
    margin: 0 0 16px;
    color: #131C2E;
    font-size: 32px;
    line-height: 150%;
    font-weight: 600;
}

.contact__heading span {
	color: var(--color-primary);
}

.contact__text {
    max-width: 720px;
    margin-bottom: 32px;
    font-size: 16px;
    line-height: 150%;
    color: #3B455A;
}

.contact__text p {
	margin: 0 0 12px;
}

.contact__text p:last-child {
	margin-bottom: 0;
}

/* Form grid - the submit button sits beside the textarea on desktop. */
.contact__form {
	display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 279px;
	grid-template-areas:
		"name    email   ."
		"comment comment submit"
		"consent consent consent";
	gap: 20px;
	align-items: start;
	font-family: 'Montserrat', sans-serif;
}

.contact__field--name {
	grid-area: name;
}

.contact__field--email {
	grid-area: email;
}

.contact__field--comment {
	grid-area: comment;
}

.contact__consent {
	grid-area: consent;
}

.contact__submit {
	grid-area: submit;
	align-self: end;
}

.contact__submit .btn.btn-primary{
	display: inline-flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 16px;
    min-height: 52px;
    padding: 8px 8px 8px 20px;
    border: none;
    border-radius: 8px;
	font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    line-height: 150%;
    font-weight: 600;
    color: #131C2E;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.contact__label {
    display: block;
    margin-bottom: 4px;
	font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    line-height: 150%;
    font-weight: 500;
    color: #3B455A;
}

.contact__required {
	color: #E5484D;
}

.contact__input {
    display: block;
    width: 100%;
    padding: 11px 19px;
    border: 1px solid #C0CBDA;
    border-radius: 4px;
    background: #F1F5F9;
	font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    line-height: 150%;
    color: #626F89;
    transition: all 0.3s;
}

.contact__input::placeholder {
	font-family: 'Montserrat', sans-serif;
	color: #9AA4B8;
}

.contact__input:focus {
	outline: none;
	border-color: var(--color-primary);
	background: var(--color-white);
}

.contact__textarea {
    min-height: 146px;
	resize: vertical;
	font-family: 'Montserrat', sans-serif;
}

/* Consent */
.contact__consent {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 20px;
}

.contact__checkbox {
	flex-shrink: 0;
	appearance: none;
	-webkit-appearance: none;
	width: 24px;
	height: 24px;
	margin: 0;
	border: 1px solid #C9D0DC;
	border-radius: 4px;
	background: var(--color-white);
	cursor: pointer;
	transition: all 0s;
}

.contact__checkbox:checked {
	border-color: #B1F836;
	background: #B1F836 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='9' viewBox='0 0 13 9' fill='none'%3E%3Cpath d='M11.0605 1.06055L4.18555 7.93555L1.06055 4.81055' stroke='%23252D3F' stroke-width='1.5' stroke-linecap='square' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px 9px no-repeat;
}

.contact__checkbox:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
}

.contact__consent-text {
	font-size: 16px;
	line-height: 150%;
	font-weight: 400;
	color: #626F89;
	cursor: pointer;
}

.contact__consent-text a {
	color: inherit;
	text-decoration: underline;
}

.contact__consent-text a:hover {
	color: var(--color-primary);
}

/* Decorative image */
.contact__media {
	position: absolute;
	top: 50%;
	right: 0%;
	width: 100%;
	max-width: 715px;
	transform: translateY(-50%);
	pointer-events: none;
}

.contact__media img {
	width: 100%;
	height: auto;
}


@media (max-width: 1440px){
	.contact{
		padding: 60px 0;
	}

	.contact__card{
		padding: 40px;
	}

	.contact__heading {
		max-width: 600px;
		font-size: 24px;
	}

	.contact__text {
		max-width: 650px;
		font-size: 14px;
		margin-bottom: 34px;
	}

	.contact__label {
		margin-bottom: 5px;
		font-size: 12px;
	}

	.contact__form {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 364px;
		gap: 18px;
	}

	.contact__input{
		font-size: 14px;
	}

	.contact__textarea {
		min-height: 150px;
	}

	.contact__submit .btn.btn-primary{
		font-size: 16px;
	}

	.contact__consent{
		padding-top: 3px;
		margin-top: 0;
		flex-wrap: nowrap;
	}

	.contact__media {
		right: -2%;
		max-width: 605px;
	}

	.contact__consent-text {
		font-size: 14px;
	}
}

@media (max-width: 1280px){
	.contact__media {
        right: -2%;
        max-width: 582px;
        top: 47%;
    }
}

/* Tablet - no room for the image, button drops below the consent row. */
@media (max-width: 1023px) {
	.contact__card {
		padding: 32px;
	}

	.contact__inner {
		max-width: none;
	}

	.contact__media {
		display: none;
	}

	.contact__form {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		grid-template-areas:
			"name    email"
			"comment comment"
			"consent consent"
			"submit  submit";
	}

	.contact__submit {
		justify-self: start;
	}
}


@media (max-width: 550px) {
    .contact {
        padding: 40px 0;
    }

	.contact__heading {
        font-size: 18px;
		margin: 0 0 8px;
    }

	.contact__card {
        padding: 24px;
	}

    .contact__text {
        margin-bottom: 22px;
        font-size: 12px;
    }

	.contact__form {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"name"
			"email"
			"comment"
			"consent"
			"submit";
        gap: 13px;
	}

	.contact__textarea {
        min-height: 100px;
        height: 116px;
    }

	.contact__consent-text {
        font-size: 12px;
    }

	.contact__consent {
        margin-top: 5px;
		align-items: flex-start;
    }

	.contact__submit .btn.btn-primary {
        font-size: 14px;
        margin-top: 5px;
        padding: 5px 8px 5px 20px;
        min-height: 47px;
    }
}
