/* ==========================================================================
   GRZ Application Center — front-end apply form
   A self-contained lime section (embeds cleanly inside any theme page),
   matching the GRZ Distribution Hub access card.
   ========================================================================== */

.grz-apps-layout,
.grz-apps-page {
	--grz-apps-primary: #c4f24b;
	--grz-apps-primary-dark: #a6d82f;
	--grz-apps-accent: #6f9c15;
	--grz-apps-bg: #e9f0ce;
	--grz-apps-surface: #fbfcf6;
	--grz-apps-ink: #1c1c15;
	--grz-apps-muted: #6c7264;
	--grz-apps-line: #e6e8d8;
	--grz-apps-font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	color: var(--grz-apps-ink);
	font-family: var(--grz-apps-font);
	font-size: 15px;
	line-height: 1.5;
}
.grz-apps-layout *,
.grz-apps-page * { box-sizing: border-box; }

.grz-apps-layout {
	position: relative;
	margin: 0 auto;
	padding: clamp(24px, 5vw, 64px) clamp(16px, 4vw, 40px);
	background: var(--grz-apps-bg);
	border-radius: 28px;
	overflow: hidden;
}

/* --- standalone full-page (Apply page takeover, matches auth screens) ----- */
body.grz-apps-standalone { margin: 0; background: var(--grz-apps-bg); }
.grz-apps-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; background: var(--grz-apps-bg); }
.grz-apps-page .grz-apps-main { flex: 1 0 auto; display: flex; padding: clamp(24px, 4vw, 56px) clamp(16px, 4vw, 40px); }
.grz-apps-page .grz-apps-shell { margin: auto; }
.grz-apps-footer { flex-shrink: 0; padding: 16px clamp(16px, 4vw, 40px) 26px; }
.grz-apps-frame { width: min(100%, 1180px); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; font-size: 0.82rem; color: var(--grz-apps-muted); }
.grz-apps-page .grz-apps-frame a { color: var(--grz-apps-muted); text-decoration: none; }
.grz-apps-page .grz-apps-frame a:hover { color: var(--grz-apps-ink); }
.grz-apps-frame nav { display: flex; gap: 18px; flex-wrap: wrap; }
.grz-apps-layout::before {
	content: "";
	position: absolute;
	left: -8%;
	top: 50%;
	width: 40%;
	max-width: 560px;
	aspect-ratio: 1;
	transform: translateY(-50%);
	border: 1px solid color-mix(in srgb, var(--grz-apps-accent) 16%, transparent);
	border-radius: 50%;
	opacity: 0.5;
	pointer-events: none;
}

.grz-apps-layout a, .grz-apps-page a { color: var(--grz-apps-accent); text-decoration: none; }
.grz-apps-layout a:hover, .grz-apps-page a:hover { color: color-mix(in srgb, var(--grz-apps-accent) 76%, #000); }
.grz-apps-brand, .grz-apps-brand:hover { text-decoration: none; }

/* --- card shell ----------------------------------------------------------- */
.grz-apps-shell {
	position: relative;
	width: min(100%, 1080px);
	margin-inline: auto;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
	gap: clamp(28px, 4vw, 60px);
	align-items: stretch;
	padding: clamp(26px, 3.4vw, 52px);
	border-radius: 26px;
	background: var(--grz-apps-surface);
	box-shadow:
		0 1px 0 color-mix(in srgb, var(--grz-apps-ink) 5%, transparent),
		0 30px 70px -34px color-mix(in srgb, var(--grz-apps-ink) 42%, transparent);
}

/* --- marketing panel (left) ---------------------------------------------- */
.grz-apps-visual { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.grz-apps-visual__content { max-width: 460px; }
.grz-apps-kicker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
	color: var(--grz-apps-accent);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.grz-apps-kicker::before { width: 7px; height: 7px; border-radius: 2px; background: var(--grz-apps-accent); content: ""; }
.grz-apps-kicker--badge::before { border-radius: 999px; }
.grz-apps-h2 {
	margin: 4px 0 18px;
	color: var(--grz-apps-ink);
	font-size: clamp(2.2rem, 1.2rem + 3vw, 3.6rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.045em;
}
.grz-apps-h2-accent { color: var(--grz-apps-accent); }
.grz-apps-visual__content p { margin: 0; max-width: 400px; color: var(--grz-apps-muted); font-size: 1rem; line-height: 1.6; }

/* --- form panel (right) --------------------------------------------------- */
.grz-apps-panel { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.grz-apps-panel__inner { width: 100%; max-width: 460px; margin: 0; }

.grz-apps-brand { display: inline-flex; align-items: baseline; gap: 8px; margin-bottom: 24px; }
.grz-apps-brand__mark { font-size: 1.5rem; font-weight: 900; letter-spacing: -0.06em; color: var(--grz-apps-ink); background: var(--grz-apps-primary); padding: 0 8px; border-radius: 8px; line-height: 1.3; }
.grz-apps-brand__name { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.16em; color: var(--grz-apps-ink); }

.grz-apps-card { width: 100%; }
.grz-apps-card__heading { margin-bottom: 22px; }
.grz-apps-card__heading .grz-apps-kicker--badge {
	padding: 5px 11px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--grz-apps-accent) 10%, var(--grz-apps-surface));
	border: 1px solid color-mix(in srgb, var(--grz-apps-accent) 22%, var(--grz-apps-line));
}
.grz-apps-card h1 { margin: 12px 0 0; color: var(--grz-apps-ink); font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; }
.grz-apps-intro { margin: 8px 0 0; color: var(--grz-apps-muted); font-size: 0.92rem; line-height: 1.6; }

/* --- fields --------------------------------------------------------------- */
.grz-apps-form { display: grid; gap: 16px; }
.grz-apps-field { display: grid; gap: 7px; margin: 0; }
.grz-apps-label { color: var(--grz-apps-ink); font-size: 13px; font-weight: 700; letter-spacing: -0.01em; }
.grz-apps-req { color: var(--grz-apps-accent); }
.grz-apps-help { color: var(--grz-apps-muted); font-size: 0.72rem; line-height: 1.45; }

.grz-apps-input {
	display: flex;
	align-items: center;
	min-width: 0;
	min-height: 50px;
	border: 1px solid var(--grz-apps-line);
	border-radius: 12px;
	background: #fff;
	transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.grz-apps-input:hover { border-color: color-mix(in srgb, var(--grz-apps-accent) 28%, var(--grz-apps-line)); }
.grz-apps-input:focus-within {
	border-color: color-mix(in srgb, var(--grz-apps-accent) 55%, var(--grz-apps-primary));
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--grz-apps-primary) 30%, transparent);
}
.grz-apps-input svg { flex: 0 0 auto; width: 18px; height: 18px; margin-inline: 15px 2px; fill: none; stroke: #9aa08c; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.grz-apps-input:focus-within svg { stroke: var(--grz-apps-accent); }
.grz-apps-input input,
.grz-apps-input select,
.grz-apps-input textarea {
	width: 100%;
	min-width: 0;
	border: 0 !important;
	outline: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--grz-apps-ink) !important;
	font: inherit;
	font-size: 0.95rem;
	padding: 0 15px !important;
	margin: 0 !important;
}
.grz-apps-input input { height: 48px; }
.grz-apps-input input::placeholder,
.grz-apps-input textarea::placeholder { color: color-mix(in srgb, var(--grz-apps-muted) 60%, #fff); opacity: 1; }
.grz-apps-input--select { position: relative; }
.grz-apps-input--select select { height: 48px; -webkit-appearance: none; appearance: none; padding-right: 40px !important; cursor: pointer; }
.grz-apps-input--select::after {
	content: "";
	position: absolute;
	right: 16px;
	top: 50%;
	width: 10px; height: 10px;
	margin-top: -6px;
	border-right: 2px solid var(--grz-apps-muted);
	border-bottom: 2px solid var(--grz-apps-muted);
	transform: rotate(45deg);
	pointer-events: none;
}
.grz-apps-input--area { align-items: stretch; }
.grz-apps-input--area textarea { min-height: 120px; padding: 13px 15px !important; resize: vertical; line-height: 1.55; }

.grz-apps-field--check { gap: 0; }
.grz-apps-check { display: inline-flex; align-items: flex-start; gap: 10px; color: var(--grz-apps-ink); font-size: 0.9rem; line-height: 1.45; cursor: pointer; }
.grz-apps-check input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--grz-apps-ink); }

/* error state */
.grz-apps-field.has-error .grz-apps-input { border-color: #d9303e; background: #fffafb; }
.grz-apps-field.has-error .grz-apps-input svg { stroke: #c62a38; }
.grz-apps-field.has-error .grz-apps-label { color: #b42331; }

/* --- submit button -------------------------------------------------------- */
.grz-apps-button {
	display: inline-flex;
	width: 100%;
	min-height: 54px;
	align-items: center;
	justify-content: center;
	gap: 9px;
	margin-top: 4px;
	border: 0;
	border-radius: 999px;
	background: var(--grz-apps-primary) !important;
	color: var(--grz-apps-ink) !important;
	box-shadow: 0 12px 26px -14px color-mix(in srgb, var(--grz-apps-primary) 92%, #000);
	cursor: pointer;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	padding: 12px 20px;
	transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.grz-apps-button::after {
	content: "";
	width: 17px; height: 17px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h13'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h13'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
}
.grz-apps-button:hover { background: var(--grz-apps-primary-dark) !important; box-shadow: 0 16px 30px -14px color-mix(in srgb, var(--grz-apps-primary) 92%, #000); transform: translateY(-1px); }
.grz-apps-button:disabled { cursor: wait; opacity: 0.75; transform: none; }
.grz-apps-button.is-loading::after { display: none; }
.grz-apps-button.is-loading::before {
	content: "";
	width: 16px; height: 16px;
	border: 2px solid color-mix(in srgb, var(--grz-apps-ink) 30%, transparent);
	border-top-color: var(--grz-apps-ink);
	border-radius: 50%;
	animation: grz-apps-spin 0.7s linear infinite;
}

/* --- notice + success ----------------------------------------------------- */
.grz-apps-notice { border: 1px solid; border-radius: 14px; font-size: 0.85rem; line-height: 1.5; padding: 12px 14px; }
.grz-apps-notice.is-error { border-color: #f2c9cd; background: #fdf5f6; color: #a3272f; }

.grz-apps-success { text-align: center; padding: 16px 4px; }
.grz-apps-success__badge {
	display: inline-grid;
	place-items: center;
	width: 64px; height: 64px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: var(--grz-apps-primary);
	color: var(--grz-apps-ink);
	box-shadow: 0 12px 26px -12px color-mix(in srgb, var(--grz-apps-primary) 92%, #000);
}
.grz-apps-success__badge svg { width: 30px; height: 30px; }
.grz-apps-success__title { margin: 0 0 8px; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; color: var(--grz-apps-ink); }
.grz-apps-success__msg { margin: 0 auto; max-width: 360px; color: var(--grz-apps-muted); line-height: 1.6; }

/* honeypot */
.grz-apps-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

/* --- motion / responsive -------------------------------------------------- */
@keyframes grz-apps-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
	.grz-apps-layout * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

@media (max-width: 880px) {
	.grz-apps-layout { border-radius: 22px; }
	.grz-apps-layout::before { display: none; }
	.grz-apps-shell {
		grid-template-columns: 1fr;
		gap: 30px;
		padding: clamp(22px, 6vw, 34px);
		border-radius: 22px;
	}
	.grz-apps-visual { order: 2; }
	.grz-apps-panel { order: 1; }
	.grz-apps-visual__content, .grz-apps-panel__inner { max-width: none; }
	.grz-apps-visual__content p { max-width: none; }
	.grz-apps-h2 { font-size: clamp(2rem, 1.2rem + 6vw, 2.8rem); }
}

/* autofill */
.grz-apps-input input:-webkit-autofill,
.grz-apps-input input:-webkit-autofill:hover,
.grz-apps-input input:-webkit-autofill:focus {
	-webkit-text-fill-color: var(--grz-apps-ink) !important;
	-webkit-box-shadow: 0 0 0 1000px #fff inset !important;
	box-shadow: 0 0 0 1000px #fff inset !important;
	transition: background-color 9999s ease-out 0s;
}
