/* ==========================================================================
   Join The Collective — application form
   Brand System v2.4 / Style Guide v1.0 §03–04, per form spec §09.
   Monochrome only. No chromatic accent anywhere in this file.

   Deviation from §09, deliberate: field descriptions and the step indicator
   are #737373, not #888888. #888888 measures 3.54:1 on white and 3.37:1 on
   the #F9F9F9 panel — below the 4.5:1 that §10 makes ship-blocking. #737373
   is the lightest grey clearing 4.5:1 on BOTH grounds (4.74:1 / 4.50:1),
   so it is the smallest change that satisfies the criterion. §09 asks for
   this contrast check explicitly.
   ========================================================================== */

.pk-collective-form {
	--pk-ink:      #181818;
	--pk-body:     #333333;
	--pk-quiet:    #737373;  /* see note above */
	--pk-rule:     #B0B0B0;
	--pk-panel:    #F9F9F9;
	--pk-display:  var(--wp--preset--font-family--mandrel-normal);
	--pk-text:     var(--wp--preset--font-family--questa-sans);

	max-width: 46rem;
	margin-inline: auto;
	color: var(--pk-body);
	font-family: var(--pk-text);
	line-height: 1.6;
}

/* ---------- step indicator (§03 text only, no bar) ---------- */

.pk-collective-form .pk-step,
.pk-collective-form .gf_progressbar_title {
	font-family: var(--pk-display);
	font-size: 0.6875rem;      /* 8pt */
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--pk-quiet);
	margin: 0 0 2rem;
}
/* belt and braces: suppress any GF-rendered bar */
.pk-collective-form .gf_progressbar,
.pk-collective-form .gf_progressbar_wrapper { display: none !important; }

/* ---------- section titles ---------- */

.pk-collective-form .gform_title,
.pk-collective-form .gsection_title {
	font-family: var(--pk-display);
	font-weight: 400;
	font-size: 1.8125rem;      /* 22pt */
	line-height: 1.25;
	color: var(--pk-ink);
	margin: 0 0 0.75rem;
}
.pk-collective-form .gsection {
	border: 0;
	margin: 3.5rem 0 2rem;
	padding: 0;
}
.pk-collective-form .gsection_title::after {
	content: "";
	display: block;
	width: 7.5rem;             /* 1.25in */
	height: 1px;
	background: var(--pk-body);
	margin-top: 0.875rem;
}

/* ---------- labels ---------- */

.pk-collective-form .gfield_label,
.pk-collective-form legend.gfield_label {
	font-family: var(--pk-display);
	font-weight: 400;
	font-size: 0.6875rem;      /* 8pt */
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--pk-ink);
	line-height: 1.6;
	display: block;
	margin-bottom: 0.625rem;
}
/* Required marker: no colour as the sole signal. */
.pk-collective-form .gfield_required {
	color: var(--pk-ink);
	font-weight: 700;
	margin-left: 0.25em;
}

/* ---------- descriptions ---------- */

.pk-collective-form .gfield_description,
.pk-collective-form .ginput_complex label {
	font-family: var(--pk-text);
	font-size: 0.75rem;        /* 9pt */
	line-height: 1.6;
	color: var(--pk-quiet);
	padding: 0;
	margin-top: 0.5rem;
}

/* ---------- inputs ---------- */

.pk-collective-form input[type="text"],
.pk-collective-form input[type="email"],
.pk-collective-form input[type="tel"],
.pk-collective-form input[type="url"],
.pk-collective-form input[type="number"],
.pk-collective-form select,
.pk-collective-form textarea {
	font-family: var(--pk-text);
	font-size: 0.9375rem;      /* ~11pt */
	line-height: 1.6;
	color: var(--pk-body);
	background: transparent;   /* no fills */
	border: 1px solid var(--pk-rule);
	border-radius: 2px;        /* §09 ceiling */
	padding: 0.75rem 0.875rem;
	width: 100%;
	min-height: 44px;          /* §09 tap target */
	box-shadow: none;
	appearance: none;
	transition: border-color 120ms ease;
}
.pk-collective-form textarea { min-height: 9rem; resize: vertical; }

.pk-collective-form select {
	/* monochrome chevron, inlined so no external asset is fetched */
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23333' stroke-width='1.2'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	padding-right: 2.5rem;
}

.pk-collective-form ::placeholder { color: var(--pk-quiet); opacity: 1; }

/* Focus: border to ink, no glow, no shadow (§09).
   A crisp 2px outline is added for keyboard users only, so §10's
   "visible focus states" is met without introducing a glow. */
.pk-collective-form :is(input, select, textarea):focus {
	border-color: var(--pk-ink);
	outline: none;
	box-shadow: none;
}
.pk-collective-form :is(input, select, textarea):focus-visible,
.pk-collective-form :is(a, button, [type="submit"]):focus-visible {
	outline: 2px solid var(--pk-ink);
	outline-offset: 2px;
}

/* ---------- choices ---------- */

.pk-collective-form .gfield_radio,
.pk-collective-form .gfield_checkbox {
	display: grid;
	gap: 0.875rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.pk-collective-form .gchoice {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	min-height: 44px;
}
.pk-collective-form .gchoice input { margin-top: 0.3rem; flex: 0 0 auto; accent-color: var(--pk-ink); }
.pk-collective-form .gchoice label {
	font-family: var(--pk-text);
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--pk-body);
}

/* ---------- intro copy panels ---------- */

.pk-collective-form .pk-intro {
	background: var(--pk-panel);
	padding: 1.75rem 1.875rem;
	margin: 0 0 0.5rem;
}
.pk-collective-form .pk-intro p { margin: 0 0 1rem; line-height: 1.7; }
.pk-collective-form .pk-intro p:last-child { margin-bottom: 0; }

/* ---------- spacing ---------- */

.pk-collective-form .gform_fields { display: grid; gap: 2.25rem; }
.pk-collective-form .gfield { margin: 0; }

/* ---------- buttons ---------- */

.pk-collective-form .gform_button,
.pk-collective-form .gform_next_button,
.pk-collective-form .gform_previous_button,
.pk-collective-form .gform_save_link {
	font-family: var(--pk-display);
	font-size: 0.6875rem;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: #FFFFFF;
	background: var(--pk-ink);
	border: 1px solid var(--pk-ink);
	border-radius: 2px;
	padding: 1rem 2rem;
	min-height: 44px;
	cursor: pointer;
	transition: background-color 120ms ease, border-color 120ms ease;
}
.pk-collective-form :is(.gform_button, .gform_next_button, .gform_previous_button, .gform_save_link):hover {
	background: var(--pk-body);
	border-color: var(--pk-body);
}
/* Secondary weight for Back / Save, still monochrome. */
.pk-collective-form .gform_previous_button,
.pk-collective-form .gform_save_link {
	background: transparent;
	color: var(--pk-ink);
	border-color: var(--pk-rule);
}
.pk-collective-form :is(.gform_previous_button, .gform_save_link):hover {
	background: transparent;
	color: var(--pk-body);
	border-color: var(--pk-ink);
}
.pk-collective-form .gform_footer,
.pk-collective-form .gform_page_footer {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
	margin-top: 3rem;
	padding: 0;
	border-top: 1px solid var(--pk-rule);
	padding-top: 2rem;
}

/* ---------- errors: no red, never colour alone (§09/§10) ---------- */

.pk-collective-form .gfield_error .gfield_label { color: var(--pk-ink); }
.pk-collective-form .gfield_validation_message,
.pk-collective-form .validation_message {
	font-family: var(--pk-text);
	font-weight: 700;
	font-size: 0.8125rem;
	line-height: 1.6;
	color: var(--pk-body);
	background: transparent;
	border: 0;
	padding: 0.5rem 0 0 1.125rem;
	margin-top: 0.5rem;
	position: relative;
}
/* Non-colour signal: a typographic mark, not a hue. */
.pk-collective-form .gfield_validation_message::before {
	content: "!";
	position: absolute;
	left: 0;
	font-weight: 700;
}
/* A hairline on the field itself — weight, not colour. */
.pk-collective-form .gfield_error :is(input, select, textarea) {
	border-width: 2px;
	border-color: var(--pk-ink);
}
.pk-collective-form .gform_validation_errors {
	background: var(--pk-panel);
	border: 1px solid var(--pk-rule);
	border-radius: 2px;
	padding: 1.25rem 1.5rem;
	margin-bottom: 2.5rem;
	box-shadow: none;
}
.pk-collective-form .gform_validation_errors > h2 {
	font-family: var(--pk-display);
	font-size: 0.75rem;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--pk-ink);
	margin: 0 0 0.5rem;
}
.pk-collective-form .gform_validation_errors a { color: var(--pk-body); }

/* ---------- confirmation ---------- */

.pk-collective-confirmation {
	max-width: 46rem;
	margin-inline: auto;
	font-family: var(--pk-text);
	line-height: 1.7;
	color: var(--pk-body);
}
.pk-collective-confirmation p:first-child {
	font-family: var(--pk-display);
	font-size: 1.8125rem;
	line-height: 1.25;
	color: var(--pk-ink);
	margin-bottom: 1.5rem;
}
.pk-collective-confirmation .pk-sig {
	font-family: var(--pk-display);
	font-size: 0.6875rem;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--pk-quiet);
	margin-top: 2.5rem;
}

/* ==========================================================================
   Modal — opened by the "Join the Collective" CTAs
   ========================================================================== */

.pk-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 4vh 1.5rem;
	opacity: 0;
	transition: opacity 300ms ease;
}
.pk-modal[hidden] { display: none; }
.pk-modal.is-open { opacity: 1; }

.pk-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(24, 24, 24, 0.72);
	cursor: pointer;
}

.pk-modal__dialog {
	position: relative;
	background: #FFFFFF;
	width: min(52rem, 100%);
	max-height: 92vh;
	display: flex;
	flex-direction: column;
	border-radius: 2px;          /* §09 ceiling */
	box-shadow: none;            /* §09: no glow, no shadow */
	border: 1px solid #B0B0B0;
	transform: translateY(12px);
	transition: transform 300ms ease;
}
.pk-modal.is-open .pk-modal__dialog { transform: translateY(0); }

.pk-modal__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 2;
	width: 44px;                 /* §09 tap target */
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 2px;
	color: #333333;
	cursor: pointer;
	transition: color 120ms ease, border-color 120ms ease;
}
.pk-modal__close:hover { color: #181818; border-color: #B0B0B0; }
.pk-modal__close:focus-visible { outline: 2px solid #181818; outline-offset: 2px; }

.pk-modal__scroll {
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding: 3.5rem 3rem 3rem;
}

.pk-modal__head { margin-bottom: 2.5rem; }
.pk-modal__eyebrow {
	font-family: var(--wp--preset--font-family--mandrel-normal);
	font-size: 0.6875rem;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: #737373;
	margin: 0 0 0.75rem;
}
.pk-modal__title {
	font-family: var(--wp--preset--font-family--mandrel-normal);
	font-weight: 400;
	font-size: 1.8125rem;        /* 22pt */
	line-height: 1.25;
	color: #181818;
	margin: 0;
}
.pk-modal__title::after {
	content: "";
	display: block;
	width: 7.5rem;               /* 1.25in */
	height: 1px;
	background: #333333;
	margin-top: 0.875rem;
}
.pk-modal__title:focus-visible { outline: 2px solid #181818; outline-offset: 4px; }

/* The form fills the dialog rather than centring inside it. */
.pk-modal .pk-collective-form { max-width: none; margin: 0; }

body.pk-modal-open { overflow: hidden; }

@media (max-width: 767px) {
	.pk-modal { padding: 0; }
	.pk-modal__dialog { max-height: 100vh; height: 100vh; width: 100%; border: 0; border-radius: 0; }
	.pk-modal__scroll { padding: 3.5rem 1.25rem 2rem; }
	.pk-modal__title { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
	.pk-modal, .pk-modal__dialog { transition: none; }
}

/* ---------- mobile (§09: single column < 768px) ---------- */

@media (max-width: 767px) {
	.pk-collective-form { padding-inline: 1.25rem; }
	.pk-collective-form .gform_fields { grid-template-columns: 1fr !important; gap: 1.75rem; }
	.pk-collective-form .gfield { grid-column: 1 / -1 !important; }
	.pk-collective-form .ginput_complex > span { display: block; margin-bottom: 1rem; }
	.pk-collective-form :is(.gform_footer, .gform_page_footer) > * { width: 100%; }
	.pk-collective-form .gsection_title { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
	.pk-collective-form * { transition: none !important; }
}
