/**
 * Korestar Forms.
 *
 * Long forms on the light page ground, in the site's own vocabulary: the
 * bold Title style for each section (as on the Legal and Privacy pages),
 * small tracked labels, square white fields, the gold button. Colours and
 * type come from the theme's custom
 * properties, with fallbacks, so this file never has to repeat a value
 * site.css already owns.
 *
 * The layout follows the width the form is given, not the screen: two
 * columns where there is room, one below 600px.
 */

.korestar-form {
	--kf-ink: var(--ink, 38, 39, 43);
	--kf-ink-c: var(--c-ink, #26272B);
	--kf-gold: var(--c-gold, #C8A030);
	--kf-gold2: var(--c-gold2, #9C7A1C);
	--kf-gold-rgb: var(--gold-rgb, 200, 160, 48);
	--kf-rust: var(--c-rust2, #B45E0A);
	--kf-rust-text: #9A4E08;
	--kf-white: var(--c-white, #FFFFFF);
	--kf-font: var(--font, 'Archivo', 'Helvetica Neue', Helvetica, sans-serif);
	container-type: inline-size;
	max-width: 920px;
	scroll-margin-top: 104px;
	font-family: var(--kf-font);
	color: var(--kf-ink-c);
}

.korestar-form [hidden] {
	display: none !important;
}

.kf-form {
	margin: 0;
}

.kf-required-note {
	margin: 0 0 36px;
	font-size: 13px;
	line-height: 1.6;
	color: rgba(var(--kf-ink), .6);
}

.kf-required {
	color: var(--kf-gold2);
	font-weight: 700;
}

/* Sections */

.kf-section {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.kf-section + .kf-section {
	margin-top: 44px;
	padding-top: 44px;
	border-top: 1px solid rgba(var(--kf-ink), .1);
}

/* The theme's .section-title (the "Title" heading style). A floated legend
   loses the browser's special legend layout and becomes an ordinary block,
   so its margin below holds the same in every browser. */
.kf-section-title {
	float: left;
	width: 100%;
	margin: 0 0 24px;
	padding: 0;
	font-size: 21px;
	font-weight: 700;
	letter-spacing: -.01em;
	line-height: 1.2;
	color: var(--kf-ink-c);
}

.kf-fields {
	clear: both;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px 20px;
}

.kf-field {
	grid-column: 1 / -1;
	min-width: 0;
}

.kf-field.kf-half {
	grid-column: auto;
}

/* Fields */

.kf-label {
	display: block;
	margin: 0 0 9px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .14em;
	line-height: 1.45;
	text-transform: uppercase;
	color: rgba(var(--kf-ink), .72);
}

.kf-input {
	display: block;
	width: 100%;
	box-sizing: border-box;
	min-height: 50px;
	margin: 0;
	padding: 13px 15px;
	background: var(--kf-white);
	border: 1px solid rgba(var(--kf-ink), .22);
	border-radius: 0;
	box-shadow: none;
	font-family: var(--kf-font);
	font-size: 15px;
	line-height: 1.4;
	color: var(--kf-ink-c);
	-webkit-appearance: none;
	appearance: none;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.kf-input::placeholder {
	color: rgba(var(--kf-ink), .42);
	opacity: 1;
}

.kf-input:hover {
	border-color: rgba(var(--kf-ink), .4);
}

.kf-input:focus {
	outline: none;
	border-color: var(--kf-gold);
	box-shadow: 0 0 0 3px rgba(var(--kf-gold-rgb), .22);
}

.kf-input[aria-invalid="true"] {
	border-color: var(--kf-rust);
}

textarea.kf-input {
	min-height: 210px;
	line-height: 1.6;
	resize: vertical;
}

select.kf-input {
	padding-right: 44px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2326272B' stroke-width='1.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 17px center;
	background-size: 12px 8px;
	cursor: pointer;
}

/* "Please select" reads as a placeholder until something is chosen. */
select.kf-input:has(option[value=""]:checked) {
	color: rgba(var(--kf-ink), .5);
}

select.kf-input option {
	color: var(--kf-ink-c);
}

.kf-input--number {
	-moz-appearance: textfield;
}

.kf-input--number::-webkit-outer-spin-button,
.kf-input--number::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.kf-help {
	margin: 9px 0 0;
	font-size: 12.5px;
	line-height: 1.6;
	color: rgba(var(--kf-ink), .58);
}

.kf-error {
	margin: 8px 0 0;
	font-size: 12.5px;
	font-weight: 500;
	line-height: 1.5;
	color: var(--kf-rust-text);
}

/* The trap field: off screen rather than display:none, which some bots skip. */
.kf-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.kf-turnstile:not(:empty) {
	margin-top: 32px;
}

/* Sending */

.kf-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 18px 28px;
	margin-top: 40px;
}

.kf-submit {
	flex: none;
	border: 0;
	border-radius: 0;
	font-family: inherit;
	text-transform: uppercase;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.kf-submit[disabled] {
	cursor: progress;
	opacity: .7;
}

.kf-submit.hv-btn[disabled]:hover {
	background: var(--kf-gold);
	transform: none;
	box-shadow: none;
}

.kf-privacy {
	flex: 1 1 260px;
	max-width: 420px;
	margin: 0;
	font-size: 12px;
	line-height: 1.6;
	color: rgba(var(--kf-ink), .58);
}

.kf-privacy a {
	color: inherit;
	text-underline-offset: 2px;
	transition: color .25s;
}

.kf-privacy a:hover {
	color: var(--kf-gold2);
	opacity: 1;
}

.kf-message {
	margin: 24px 0 0;
	padding: 14px 18px;
	background: var(--kf-white);
	border-left: 2px solid var(--kf-gold);
	font-size: 14px;
	line-height: 1.6;
}

.kf-message.is-error {
	border-left-color: var(--kf-rust);
	color: var(--kf-rust-text);
}

/* Thank you */

.kf-done {
	padding: 44px 40px 46px;
	background: var(--kf-white);
	border: 1px solid rgba(var(--kf-ink), .1);
	border-top: 2px solid var(--kf-gold);
}

.kf-done:focus {
	outline: none;
}

.kf-done-title {
	font-size: 26px;
	font-weight: 800;
	letter-spacing: -.01em;
	line-height: 1.15;
	font-variation-settings: 'wdth' 102;
	color: var(--kf-ink-c);
}

.kf-done-text {
	max-width: 560px;
	margin: 14px 0 0;
	font-size: 15px;
	line-height: 1.7;
	color: rgba(var(--kf-ink), .7);
}

.kf-again {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin-top: 28px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .16em;
	text-decoration: none;
	color: var(--kf-gold2);
	transition: gap .25s;
}

.kf-again:hover {
	gap: 16px;
	opacity: 1;
}

.kf-arrow {
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
}

/* One column once the form itself is narrow. */
@container (max-width: 600px) {
	.kf-fields {
		grid-template-columns: minmax(0, 1fr);
	}

	.kf-field.kf-half {
		grid-column: 1 / -1;
	}

	.kf-done {
		padding: 32px 24px 34px;
	}
}

/* iOS zooms into any field set below 16px. */
@media (max-width: 768px) {
	.kf-input {
		font-size: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kf-input,
	.kf-again {
		transition: none;
	}
}
