/* =========================================================================
   HR Onboarding Portal — public styles
   Brand styling ported faithfully from the original Arquitectonica forms.
   All selectors are namespaced under .hrp to avoid theme collisions.
   ========================================================================= */

.hrp {
	--brand-black: #111111;
	--brand-white: #FFFFFF;
	--brand-accent: #4A6FA5;
	--brand-accent-dark: #2C4A73;
	--brand-accent-light: #EEF3FA;
	--brand-red: #8B2E1A;
	--brand-gray-100: #F5F5F4;
	--brand-gray-200: #E8E8E6;
	--brand-gray-400: #9A9A97;
	--brand-gray-600: #555552;
	--font-display: 'EB Garamond', Georgia, serif;
	--font-body: 'DM Sans', Helvetica, Arial, sans-serif;
	--max-width: 680px;
	--radius: 6px;

	font-family: var(--font-body);
	background: var(--brand-white);
	color: var(--brand-black);
	line-height: 1.6;
}

.hrp *,
.hrp *::before,
.hrp *::after { box-sizing: border-box; }

/* ---- Progress bar ---- */
#hrp-progress {
	position: fixed;
	top: 0;
	left: 0;
	height: 2px;
	width: 0;
	background: var(--brand-accent);
	transition: width 0.2s ease;
	z-index: 100;
}

/* ---- Header ---- */
.hrp-header {
	border-bottom: 1px solid var(--brand-black);
	padding: 1.5rem 1rem;
	margin-bottom: 3rem;
}

.hrp-header-inner {
	max-width: var(--max-width);
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.hrp-logo {
	font-weight: 500;
	font-size: 13px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--brand-black);
}

.hrp-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	background: var(--brand-accent);
	border-radius: 50%;
	margin-right: 8px;
	vertical-align: middle;
	position: relative;
	top: -1px;
}

.hrp-tag {
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--brand-gray-400);
}

/* ---- Layout ---- */
.hrp-wrap {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 1rem 4rem;
}

/* ---- Hero ---- */
.hrp-hero {
	border-left: 2px solid var(--brand-accent);
	padding-left: 1.5rem;
	margin-bottom: 3rem;
}

.hrp-hero h1 {
	font-family: var(--font-display);
	font-size: clamp(28px, 5vw, 40px);
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--brand-black);
	margin: 0 0 0.75rem;
}

.hrp-hero h1 em { font-style: italic; color: var(--brand-gray-600); }
.hrp-hero h1 em.hrp-accent { font-style: normal; color: var(--brand-accent); }

.hrp-hero p {
	font-size: 15px;
	color: var(--brand-gray-600);
	max-width: 520px;
	line-height: 1.7;
	margin: 0 0 0.5rem;
}

.hrp-hero-note { font-size: 14px; }

.hrp-hero-meta,
.hrp-step {
	margin-top: 1rem;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--brand-gray-400);
}

.hrp-step { color: var(--brand-accent); font-weight: 500; margin-bottom: 0.5rem; }

/* ---- Sections ---- */
.hrp-section { margin-bottom: 3rem; animation: hrpFadeUp 0.4s ease both; }

.hrp-section-header {
	display: flex;
	align-items: baseline;
	gap: 1rem;
	margin-bottom: 1.25rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--brand-gray-200);
}

.hrp-section-number {
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--brand-accent);
	font-weight: 500;
	min-width: 24px;
}

.hrp-section-title {
	font-family: var(--font-display);
	font-size: 20px;
	font-weight: 400;
	color: var(--brand-black);
	margin: 0;
}

/* ---- Cards ---- */
.hrp-card {
	background: var(--brand-white);
	border: 1px solid var(--brand-gray-200);
	border-radius: var(--radius);
	padding: 1.25rem 1.5rem;
	margin-bottom: 10px;
	transition: border-color 0.15s ease;
}

.hrp-card:focus-within { border-color: var(--brand-black); }

.hrp-label {
	font-size: 14px;
	font-weight: 500;
	color: var(--brand-black);
	margin: 0 0 4px;
	line-height: 1.5;
}

.hrp-hint { font-size: 12px; color: var(--brand-gray-400); margin: 0 0 12px; }

/* ---- Chips ---- */
.hrp-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.hrp-chips-mt { margin-top: 4px; }

.hrp-chips input[type="checkbox"],
.hrp-chips input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }

.hrp-chips label {
	display: inline-block;
	font-size: 13px;
	padding: 5px 14px;
	border-radius: 999px;
	border: 1px solid var(--brand-gray-200);
	color: var(--brand-gray-600);
	cursor: pointer;
	transition: all 0.12s ease;
	user-select: none;
}

.hrp-chips label:hover { border-color: var(--brand-black); color: var(--brand-black); }

.hrp-chips input:checked + label {
	background: var(--brand-accent);
	border-color: var(--brand-accent);
	color: var(--brand-white);
}

.hrp-chips input:focus-visible + label { outline: 2px solid var(--brand-accent-dark); outline-offset: 2px; }

/* ---- Text inputs ---- */
.hrp textarea,
.hrp input[type="text"],
.hrp input[type="email"],
.hrp input[type="password"] {
	width: 100%;
	font-family: var(--font-body);
	font-size: 14px;
	color: var(--brand-black);
	background: var(--brand-gray-100);
	border: 1px solid transparent;
	border-radius: var(--radius);
	padding: 10px 14px;
	resize: vertical;
	outline: none;
	transition: border-color 0.15s ease, background 0.15s ease;
	margin-top: 4px;
}

.hrp textarea { min-height: 80px; }
.hrp-textarea-sm { min-height: 60px !important; }
.hrp-text-sm { margin-top: 12px !important; padding: 8px 12px !important; }
.hrp-text-inline { min-height: auto !important; padding: 10px 14px !important; }
.hrp-mb-sm { margin-bottom: 8px; }
.hrp-mt-0 { margin-top: 0 !important; }

.hrp textarea:focus,
.hrp input[type="text"]:focus,
.hrp input[type="email"]:focus,
.hrp input[type="password"]:focus { background: var(--brand-white); border-color: var(--brand-black); }

.hrp textarea::placeholder,
.hrp input::placeholder { color: var(--brand-gray-400); }

/* ---- Two-column ---- */
.hrp-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.hrp-two-col .hrp-card { margin-bottom: 0; }
.hrp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---- Slider ---- */
.hrp-slider-wrap { margin-top: 8px; }
.hrp-slider-labels {
	display: flex;
	justify-content: space-between;
	font-size: 11px;
	color: var(--brand-gray-400);
	margin-bottom: 6px;
	letter-spacing: 0.04em;
}

.hrp input[type="range"] { width: 100%; accent-color: var(--brand-accent-dark); cursor: pointer; height: 2px; }

.hrp-slider-value {
	text-align: center;
	font-size: 32px;
	font-family: var(--font-display);
	color: var(--brand-accent-dark);
	margin-top: 8px;
}

.hrp-slider-value span { font-size: 13px; color: var(--brand-gray-400); margin-left: 4px; }

/* ---- Callouts ---- */
.hrp-confidential,
.hrp-hr-note {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	border-radius: var(--radius);
	padding: 0.75rem 1rem;
	margin-top: 8px;
	font-size: 12px;
	line-height: 1.5;
}

.hrp-confidential { background: var(--brand-gray-100); color: var(--brand-gray-600); }
.hrp-confidential::before { content: "\1F512"; font-size: 14px; flex-shrink: 0; }
.hrp-hr-note { background: var(--brand-accent-light); border: 1px solid var(--brand-accent); color: var(--brand-accent-dark); }
.hrp-hr-note::before { content: "\1F512"; font-size: 14px; flex-shrink: 0; }

/* ---- File upload ---- */
.hrp-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.hrp-file-label {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 6px;
	padding: 10px 14px;
	background: var(--brand-gray-100);
	border: 1.5px dashed var(--brand-gray-200);
	border-radius: var(--radius);
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
	font-size: 13px;
	color: var(--brand-gray-600);
}

.hrp-file-label:hover { border-color: var(--brand-accent); background: var(--brand-accent-light); color: var(--brand-accent-dark); }
.hrp-file-label svg { flex-shrink: 0; width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hrp-file-name { margin: 6px 0 0; font-size: 12px; color: var(--brand-accent-dark); min-height: 18px; }

/* ---- Submit ---- */
.hrp-submit-section { border-top: 1px solid var(--brand-gray-200); padding-top: 2rem; margin-top: 3rem; }
.hrp-submit-note { font-size: 13px; color: var(--brand-gray-400); margin: 0 0 1.5rem; line-height: 1.6; }

.hrp-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: var(--brand-accent);
	color: var(--brand-white);
	font-family: var(--font-body);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 14px 32px;
	border: none;
	border-radius: var(--radius);
	cursor: pointer;
	transition: background 0.15s ease;
}

.hrp-btn:hover { background: var(--brand-black); }
.hrp-btn:active { transform: scale(0.99); }
.hrp-btn[disabled] { opacity: 0.6; cursor: default; }
.hrp-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Standalone page canvas (theme bypassed) ---- */
body.hrp-standalone { margin: 0; background: #ffffff; }

/* Login: single screen, no scrollbars. */
html:has(body.hrp-login-page), body.hrp-login-page { height: 100%; overflow: hidden; }
body.hrp-login-page .hrp-simple { height: 100vh; height: 100dvh; padding: 16px 24px; box-sizing: border-box; }

/* ---- Minimal login ---- */
.hrp-simple {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 24px;
	position: relative;
}
.hrp-simple-card { width: 100%; max-width: 360px; margin: auto; }
.hrp-simple-logo { text-align: center; margin: 0 0 1.75rem; }
.hrp-simple-logo img { width: 230px; max-width: 80%; height: auto; }
.hrp-btn-block { width: 100%; justify-content: center; }

.hrp-simple-footer {
	width: 100%;
	max-width: 680px;
	margin-top: auto;
	padding: 1.25rem 0.25rem 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}
.hrp-simple-footer-text {
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--brand-gray-400);
}
.hrp-simple-footer-logo { height: 44px; width: auto; opacity: 1; }

@media ( max-width: 520px ) {
	.hrp-simple-footer { flex-direction: column-reverse; gap: 0.75rem; text-align: center; }
}

/* ---- Login screen ---- */
.hrp-login-wrap { max-width: 460px; }
.hrp-login-form { margin-top: 1.5rem; }
.hrp-field { margin-bottom: 1.25rem; }
.hrp-field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.hrp-code-input { letter-spacing: 0.5em; font-size: 20px; text-align: center; font-family: var(--font-display); }
.hrp-remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--brand-gray-600); margin-bottom: 1.25rem; }
.hrp-login-help { margin-top: 1rem; font-size: 13px; }
.hrp-login-help a { color: var(--brand-accent); text-decoration: none; }
.hrp-login-help a:hover { text-decoration: underline; }

/* ---- Alerts ---- */
.hrp-alert {
	background: #FCEFEC;
	border: 1px solid var(--brand-red);
	color: var(--brand-red);
	border-radius: var(--radius);
	padding: 0.85rem 1rem;
	font-size: 14px;
	margin-bottom: 1.5rem;
}

/* ---- Success ---- */
.hrp-success { border-left: 2px solid var(--brand-accent); padding: 2rem 0 2rem 1.5rem; }
.hrp-success h2 { font-family: var(--font-display); font-size: 32px; font-weight: 400; margin: 0 0 0.5rem; }
.hrp-success h2 em { font-style: italic; color: var(--brand-gray-600); }
.hrp-success p { font-size: 15px; color: var(--brand-gray-600); margin: 1rem 0 0; }
.hrp-sign { font-size: 13px !important; color: var(--brand-gray-400) !important; }

/* ---- Footer ---- */
.hrp-footer {
	max-width: var(--max-width);
	margin: 4rem auto 0;
	padding: 1.5rem 1rem;
	border-top: 1px solid var(--brand-gray-200);
	font-size: 11px;
	color: var(--brand-gray-400);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}

/* ---- Animations + responsive ---- */
@keyframes hrpFadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 520px) {
	.hrp-tag { display: none; }
	.hrp-card { padding: 1rem; }
	.hrp-two-col { grid-template-columns: 1fr; }
}

/* =========================================================================
   Mobile responsiveness pass — additive only, nothing above this line is
   changed. Tightens spacing/typography on phones without altering desktop.
   ========================================================================= */
@media (max-width: 600px) {
	.hrp-header { padding: 1.1rem 1rem; margin-bottom: 2rem; }
	.hrp-wrap { padding: 0 1rem 3rem; }

	.hrp-hero { padding-left: 1rem; margin-bottom: 2rem; }
	.hrp-hero h1 { font-size: clamp(24px, 8vw, 32px); }
	.hrp-hero p { font-size: 14px; }

	.hrp-section { margin-bottom: 2rem; }
	.hrp-section-header { gap: 0.6rem; margin-bottom: 1rem; }
	.hrp-section-title { font-size: 17px; }

	.hrp-card { padding: 1rem 1.1rem; }
	.hrp-chips label { padding: 6px 12px; font-size: 12.5px; }

	.hrp-grid-2 { grid-template-columns: 1fr; }

	.hrp-btn { width: 100%; justify-content: center; padding: 14px 20px; }
	.hrp-submit-section { padding-top: 1.5rem; margin-top: 2rem; }

	.hrp-footer { flex-direction: column; align-items: flex-start; gap: 0.4rem; margin-top: 2.5rem; }

	.hrp-slider-value { font-size: 26px; }
}

/* Very small phones */
@media (max-width: 360px) {
	.hrp-simple-logo img { width: 190px; }
	.hrp-hero h1 { font-size: 22px; }
	.hrp-code-input { letter-spacing: 0.35em; font-size: 18px; }
}

/* Login screen: keep it comfortable (not clipped) on short mobile viewports
   even though it's locked to one screen on desktop. */
@media (max-width: 600px), (max-height: 700px) {
	html:has(body.hrp-login-page), body.hrp-login-page { height: auto; overflow: auto; }
	body.hrp-login-page .hrp-simple { height: auto; min-height: 100vh; min-height: 100dvh; padding: 32px 20px; }
	.hrp-simple-footer { margin-top: 2rem; }
}

/* Avoid iOS auto-zoom on input focus (inputs under 16px trigger zoom). */
@media (max-width: 600px) {
	.hrp input[type="text"],
	.hrp input[type="email"],
	.hrp input[type="password"],
	.hrp textarea,
	.hrp select { font-size: 16px; }
}
