<!DOCTYPE html>
<html lang="{{ page.lang | default: site.lang | default: en }}">
	{%- include head.html -%}
	<body>
		{%- include header.html -%}
		<div class="container">
			<main>
				<section class="capsule-header">
					<div class="center">
						<div class="capsule">contact</div>
					</div>
					<br>
					<h2 class="gradient-text center contact-header">tell us about your biggest security challenges</h2>
					<br>
					<p class="hero-p center" style="filter: brightness(70%)">Fill out the form below to start the conversation about how we can help you eliminate single points of failure and build security that doesn't rely on blind trust.</p>
				</section>
				<section class="flex-container" style="margin-top: 80px">
					<div class="flex-container-inner">
						<div class="form-container card">
							<form onsubmit="return validateForm()" action="/submit-email" method="post">
								<div class="form-flex-container">
									<div>
										<label for="name" class="form-label">Your name</label>
										<input type="text" id="name" name="name" class="form-input">
									</div>
								</div>

								<label for="email" class="form-label required">Your email</label>
								<input placeholder="Enter your business email..." type="email" id="email" name="email" class="form-input" required>

								<label for="company-name" class="form-label">Company name</label>
								<input type="text" id="company-name" name="company-name" class="form-input">

								<label for="service" class="form-label required">What service are you interested in?</label>
								<select id="service" name="service" class="form-select" required>
									<option value="" disabled selected>Select option</option>
									<option value="software-security-assessment">Security assessment</option>
									<option value="retained">Retainer / Fractional CISO</option>
									<option value="engineering">Software engineering</option>
									<option value="digital-asset-custody">Digital asset custody</option>
									<option value="general-inquiry">General inquiry</option>
								</select>

								<label for="help" class="form-label required">How can we help?</label>
								<textarea id="help" name="help" class="form-textarea" required></textarea>

								<div id="other-field" style="display:none;">
									<input type="text" id="other-source" name="other-source" class="form-input" placeholder="Please specify">
								</div>

								<!-- TODO: add captcha of some sort -->

								<button type="submit" class="contact-button">Submit</button>
								<p class="center submit-policy">We respect your privacy. The information you provide will only be used to respond to your inquiry and will never be shared externally.</p>
							</form>
						</div>
					</div>
				</section>
				<section style="margin-bottom: 0px">
					<div class="logo-section">
						<div class="logo-slider" id="logoSlider">
							<img src="assets/base/companies/coinbase-white.svg" alt="Coinbase">
							<img src="assets/base/companies/bitgo-logo-white.svg" alt="BitGo">
							<img style="filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%);"
									 src="assets/base/companies/bishop-fox-dark.png" alt="Bishop Fox">
							<img style="filter: invert(100)" src="assets/base/companies/turnkey-black.svg" alt="Turnkey">
							<img style="height: 40px" src="assets/base/companies/falconx-white.svg" alt="FalconX">
							<img src="assets/base/companies/exodus-white.svg" alt="Exodus">
							<img src="assets/base/companies/sidero-labs-white.png" alt="Sidero Labs">
							<img src="assets/base/companies/zoom-white.png" alt="Zoom">
							<img src="assets/base/companies/mysten-labs-white.svg" alt="Mysten Labs">
							<img style="height: 60px; filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(200%) contrast(102%);"
									 src="assets/base/companies/ankr.png" alt="Ankr">
							<img style="height: 60px" src="assets/base/companies/hashicorp-white.png" alt="HashiCorp">
							<img style="filter: invert(100)" src="assets/base/companies/block-one-dark.svg" alt="Block One">
							<img src="assets/base/companies/ledn-white.svg" alt="Ledn">
							<img src="assets/base/companies/fitbit-white.png" alt="Fitbit">
							<img src="assets/base/companies/dfns-color.png" alt="Dfns">
						</div>
					</div>
				</section>
			</main>
			<br />
			{%- include footer.html -%}
		</div>
	</body>

	<script>
		function toggleOtherField() {
			var hearAbout = document.getElementById('hear-about').value;
			var otherField = document.getElementById('other-field');
			if (hearAbout === 'other') {
				otherField.style.display = 'block';
				document.getElementById('other-source').required = true;
			} else {
				otherField.style.display = 'none';
				document.getElementById('other-source').required = false;
			}
		}

		function validateForm() {
			var inquiryType = document.getElementById('inquiry-type');
			var services = document.getElementById('services');
			var hearAbout = document.getElementById('hear-about');

			if (inquiryType.value === "") {
				alert("Please select a valid Inquiry Type");
				return false;
			}
			if (services.value === "") {
				alert("Please select a valid Service you are interested in");
				return false;
			}
			return true;
		}
	</script>
</html>