/* Husky Contact — black, minimal, Helvetica; rainbow only as a focus accent. */

.husky-contact {
	--hc-font: Helvetica, "Helvetica Neue", Arial, sans-serif;
	--hc-line: rgba(255, 255, 255, .35);
	--hc-muted: rgba(255, 255, 255, .6);
	--hc-error: #ff6b6b;
	--hc-rainbow: linear-gradient(90deg, #ff3b30, #ff8a00, #ffd400, #34c759, #00d1e0, #2f6bff, #8e44ff, #ff3fa4);

	box-sizing: border-box;
	width: 100%;
	max-width: 760px;
	margin: 0;
	/* Clears Semplice's floating header (about 78px) with breathing room. */
	padding: var(--hc-top, clamp(130px, 18vh, 190px)) 0 96px;
	color: #fff;
	font-family: var(--hc-font);
	text-align: left;
}
.husky-contact *,
.husky-contact *::before,
.husky-contact *::after { box-sizing: border-box; }

.husky-contact .hc-heading {
	margin: 0 0 56px !important;
	padding: 0;
	font-family: var(--hc-font) !important;
	font-weight: 700 !important;
	font-size: clamp(40px, 7vw, 96px) !important;
	line-height: .95 !important;
	letter-spacing: -.01em;
	text-transform: uppercase;
	color: #fff !important;
}

.hc-form { margin: 0; }
.hc-form[hidden], .hc-done[hidden], .hc-error-summary[hidden] { display: none !important; }

.hc-field { position: relative; margin: 0 0 36px; }

.hc-field label {
	display: block;
	margin: 0 0 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--hc-muted);
	transition: color 200ms ease;
}
.hc-field:focus-within label { color: #fff; }

.hc-field input,
.hc-field textarea {
	display: block;
	width: 100%;
	margin: 0;
	padding: 10px 0 12px;
	border: 0;
	border-bottom: 1px solid var(--hc-line);
	border-radius: 0;
	background: transparent;
	color: #fff;
	font-family: var(--hc-font);
	font-size: 20px;
	line-height: 1.4;
	outline: none;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
	resize: vertical;
}
.hc-field textarea { min-height: 150px; }
.hc-field input::placeholder,
.hc-field textarea::placeholder { color: rgba(255, 255, 255, .3); }

/* Underline on focus: a quick RGB/CMY sweep runs along the line, then it settles into one accent
   colour (each field its own). On blur it slides back to the thin grey line. */
.hc-field { --hc-accent: #00f0ff; }
.hc-field:nth-of-type(2) { --hc-accent: #ff2bd6; }
.hc-field:nth-of-type(3) { --hc-accent: #ffe600; }
.hc-control { position: relative; display: block; overflow: hidden; }
.hc-control::before,
.hc-control::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	pointer-events: none;
}
.hc-control::after {                                   /* the settled accent line */
	background: var(--hc-accent);
	transform: scaleX(0);
	transform-origin: right center;
	transition: transform 320ms cubic-bezier(.4, 0, .2, 1);
}
.hc-control:focus-within::after {
	transform: scaleX(1);
	transform-origin: left center;
	transition: transform calc(var(--hc-sweep, 520ms) * .7) cubic-bezier(.2, .8, .2, 1) calc(var(--hc-sweep, 520ms) * .3);
}
.hc-control::before {                                  /* the sweep: a short band of colour */
	z-index: 1;
	width: 55%;
	right: auto;
	background: linear-gradient(90deg, transparent, #ff1f1f 12%, #ffe600 28%, #00e64d 44%, #00f0ff 60%, #3d5cff 76%, #ff2bd6 90%, transparent);
	transform: translateX(-110%);
	opacity: 0;
}
.hc-control:focus-within::before { animation: hc-sweep var(--hc-sweep, 520ms) cubic-bezier(.3, .1, .3, 1) both; }
@keyframes hc-sweep {
	0% { transform: translateX(-110%); opacity: 1; }
	80% { opacity: 1; }
	100% { transform: translateX(200%); opacity: 0; }
}
.hc-field input:focus,
.hc-field textarea:focus { border-bottom-color: transparent; }
/* keyboard focus stays obvious: label brightens and a soft outline sits outside the field */
.hc-field input:focus-visible,
.hc-field textarea:focus-visible { outline: 1px dotted rgba(255, 255, 255, .45); outline-offset: 6px; }

/* HUSKY: the letters move on their own (husky-contact.js), never shifting the layout */
/* each letter is its own box, so keep the word on one line (phones were splitting it HUS / KY) */
.husky-contact .husky-colors { display: inline-block; white-space: nowrap; }
.hc-heading .husky-colors .hl-letter { display: inline-block; transform-origin: 50% 85%; will-change: transform; }

.hc-field.is-invalid input,
.hc-field.is-invalid textarea { border-bottom-color: var(--hc-error); }
.hc-err {
	display: block;
	min-height: 0;
	margin-top: 8px;
	font-size: 13px;
	color: var(--hc-error);
}
.hc-err:empty { display: none; }

.hc-error-summary {
	margin: 0 0 32px;
	padding: 12px 16px;
	border: 1px solid var(--hc-error);
	color: #fff;
	font-size: 14px;
}

/* Honeypot: off-screen, not display:none (some bots skip hidden fields). */
.hc-hp {
	position: absolute !important;
	left: -10000px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.hc-submit {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 180px;
	height: 56px;
	margin: 8px 0 0;
	padding: 0 32px;
	border: 1.5px solid #fff;
	border-radius: 0;
	background: transparent;
	color: #fff;
	font-family: var(--hc-font);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	cursor: pointer;
	overflow: hidden;
	transition: color 250ms ease, border-color 250ms ease;
}
.hc-submit::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--hc-rainbow);
	opacity: 0;
	transition: opacity 300ms ease;
}
.hc-submit span { position: relative; }
.hc-submit:hover::before,
.hc-submit:focus-visible::before { opacity: 1; }
.hc-submit:hover,
.hc-submit:focus-visible { border-color: transparent; color: #000; outline: none; }
.hc-submit:focus-visible { box-shadow: 0 0 0 2px #000, 0 0 0 4px #fff; }
.hc-submit[disabled] { cursor: progress; opacity: .6; }
.hc-submit[disabled]::before { opacity: 0; }

/* HUSKY GOT YOUR MESSAGE. — shown only after the server confirms */
.hc-done { padding: 4px 0 0; color: #fff; }
.husky-contact .hc-done-head {
	margin: 0 !important;
	font-family: var(--hc-font) !important;
	font-weight: 700 !important;
	font-size: clamp(30px, 4.6vw, 64px) !important;
	line-height: 1 !important;
	letter-spacing: -.01em;
	text-transform: uppercase;
	color: #fff !important;
}
.hc-done-head > span { display: inline-block; }
.hc-done.is-in .hc-done-head > span { animation: hc-word 760ms cubic-bezier(.2, 1.5, .35, 1) both; }
.hc-done.is-in .hc-done-head > span:nth-child(2) { animation-delay: 70ms; }
.hc-done.is-in .hc-done-head > span:nth-child(3) { animation-delay: 140ms; }
.hc-done.is-in .hc-done-head > span:nth-child(4) { animation-delay: 210ms; }
@keyframes hc-word { from { transform: translateY(.55em); opacity: 0; } 40% { opacity: 1; } to { transform: none; opacity: 1; } }
.hc-done-line { position: relative; display: block; height: 2px; margin: 26px 0 22px; max-width: 420px; background: #ffe600; overflow: hidden; }
.hc-done-line::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, #ff1f1f, #ffe600, #00e64d, #00f0ff, #3d5cff, #ff2bd6);
	opacity: 0;
}
.hc-done.is-in .hc-done-line { animation: hc-line 700ms cubic-bezier(.2, .8, .2, 1) 260ms both; }
.hc-done.is-in .hc-done-line::before { animation: hc-line-colour 1200ms ease 260ms both; }
@keyframes hc-line { from { transform: scaleX(0); transform-origin: left; } to { transform: scaleX(1); transform-origin: left; } }
@keyframes hc-line-colour { 0% { opacity: 1; } 55% { opacity: 1; } 100% { opacity: 0; } }
.hc-done-sub { margin: 0; font-size: clamp(16px, 1.6vw, 20px); line-height: 1.4; color: rgba(255, 255, 255, .7); }
/* the small thank-you line is for screen readers only now (the raining mail says it) */
.husky-contact .hc-done-sub { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; margin: -1px !important; }
/* raining mail: a fixed little stage under the divider, right-aligned to it — its room is kept from the start, so nothing moves */
.hc-done { position: relative; }
.hc-rain { position: relative; display: flex; justify-content: flex-end; max-width: 420px; height: 132px; margin: -8px 0 0; pointer-events: none; }
.hc-rain canvas { display: block; image-rendering: pixelated; }
.hc-done:focus { outline: none; }

@media (prefers-reduced-motion: reduce) {
	.husky-contact *, .husky-contact *::before, .husky-contact *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation: none !important; }
	.hc-heading .husky-colors .hl-letter { transform: none !important; }
}
/* Contact Lab (admins): same look as the grid labs */
.hg-lab.hc-lab { left: auto; right: 16px; top: 96px; bottom: auto; }
.hc-lab .hc-lab-try { all: unset; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.hc-lab .hc-lab-try:focus-visible { outline: 1px solid #fff; outline-offset: 2px; }
@media (max-width: 599px) { .husky-contact .hc-heading { margin-bottom: 40px !important; } .hc-field input, .hc-field textarea { font-size: 18px; } }
