/* =====================================================================
   Edynamics - Business Growth Diagnostic
   Distraction-free conversion page. Matches the main site type system,
   with the diagnostic's blue #2563EB accent.
   ===================================================================== */

:root {
	--db: #2563EB;
	--db-dark: #1D4ED8;
	--db-light: #EFF4FF;
	--db-border: #DCE6FB;
}

.diag-page {
	background: var(--white);
	color: var(--ink);
	min-height: 100vh;
}

.diag { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- Top bar + progress ---------------------------------------- */
.diag-top {
	display: flex; align-items: center; justify-content: space-between;
	padding: 22px 40px; border-bottom: 1px solid var(--border);
	position: sticky; top: 0; background: rgba(255,255,255,0.92);
	backdrop-filter: saturate(180%) blur(8px); z-index: 50;
}
.diag-top__brand {
	font-family: var(--f-display); font-style: italic; font-size: 26px;
	letter-spacing: -0.01em; color: var(--ink);
}
.diag-top__meta { display: flex; align-items: center; gap: 16px; }
.diag-top__step { font-family: var(--f-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--mid); }
.diag-top__pct { font-family: var(--f-mono); font-size: 11px; color: var(--db); font-weight: 700; }

.diag-progress { height: 3px; background: var(--warm-grey); position: sticky; top: 65px; z-index: 49; }
.diag-progress__fill { height: 100%; width: 0; background: var(--db); transition: width 0.5s var(--ease); }

/* ---------- Stage / screens ------------------------------------------- */
.diag-stage {
	flex: 1; display: flex; flex-direction: column; align-items: center;
	width: 100%; max-width: 760px; margin: 0 auto; padding: 56px 40px 96px;
}
.diag-screen { width: 100%; opacity: 0; transform: translateY(14px); }
.diag-screen.is-active { opacity: 1; transform: none; transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }

/* ---------- Landing --------------------------------------------------- */
.diag-screen--landing { display: flex; align-items: center; justify-content: center; min-height: 62vh; }
.diag-landing { text-align: center; max-width: 640px; }
.diag-landing__title {
	font-family: var(--f-display); font-style: italic; font-weight: 400;
	font-size: 64px; line-height: 1.04; letter-spacing: -0.01em; color: var(--ink);
	margin-bottom: 24px;
}
.diag-landing__sub {
	font-family: var(--f-body); font-weight: 300; font-size: 18px; line-height: 1.7;
	color: var(--mid); margin-bottom: 34px;
}
.diag-proof {
	display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
	gap: 14px; margin-bottom: 40px;
}
.diag-proof__item { font-family: var(--f-body); font-weight: 500; font-size: 14px; color: var(--ink); }
.diag-proof__dot { color: var(--light); }
.diag-usedby {
	margin-top: 28px; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.08em;
	color: var(--mid);
}

/* ---------- Buttons --------------------------------------------------- */
.diag-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	font-family: var(--f-body); font-weight: 500; font-size: 15px; letter-spacing: 0.01em;
	padding: 15px 30px; background: var(--db); color: #fff; border: 1px solid var(--db);
	border-radius: 6px; transition: background 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
	position: relative;
}
.diag-btn:hover { background: var(--db-dark); border-color: var(--db-dark); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(37,99,235,0.24); }
.diag-btn--lg { padding: 18px 40px; font-size: 17px; }
.diag-btn--full { width: 100%; padding: 17px 30px; font-size: 16px; }
.diag-btn.is-loading .diag-btn__label { visibility: hidden; }
.diag-btn__spin {
	position: absolute; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.4);
	border-top-color: #fff; border-radius: 50%; opacity: 0; animation: diagspin 0.7s linear infinite;
}
.diag-btn.is-loading .diag-btn__spin { opacity: 1; }
@keyframes diagspin { to { transform: rotate(360deg); } }

/* ---------- Questions ------------------------------------------------- */
.diag-screen--quiz { min-height: 56vh; }
.diag-q__count { font-family: var(--f-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--db); }
.diag-q__title {
	font-family: var(--f-display); font-style: italic; font-weight: 400;
	font-size: 38px; line-height: 1.12; letter-spacing: -0.01em; color: var(--ink);
	margin: 14px 0 8px;
}
.diag-q__hint { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.05em; color: var(--mid); margin-bottom: 8px; }

.diag-opts { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }
.diag-opt {
	display: flex; align-items: center; gap: 16px; width: 100%; text-align: left;
	min-height: 64px; padding: 16px 20px; background: var(--white);
	border: 1px solid var(--border); border-radius: 10px; color: var(--ink);
	font-family: var(--f-body); font-size: 16px; line-height: 1.4;
	transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.diag-opt:hover { border-color: var(--db); background: var(--db-light); transform: translateY(-1px); }
.diag-opt:focus-visible { outline: none; border-color: var(--db); box-shadow: 0 0 0 3px rgba(37,99,235,0.18); }
.diag-opt.is-selected { border-color: var(--db); background: var(--db-light); box-shadow: inset 0 0 0 1px var(--db); }
.diag-opt__label { flex: 1; }
.diag-opt__icon { flex: 0 0 auto; width: 34px; height: 34px; color: var(--db); }
.diag-opt__icon svg { width: 34px; height: 34px; }
.diag-opt__mark {
	flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
	border: 1.5px solid var(--border); position: relative; transition: all 0.2s var(--ease);
}
.diag-opt.is-selected .diag-opt__mark { border-color: var(--db); background: var(--db); }
.diag-opt.is-selected .diag-opt__mark::after {
	content: ''; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px;
	border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.diag-opts--icon .diag-opt { align-items: center; }

/* ---------- Quiz nav -------------------------------------------------- */
.diag-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 34px; }
.diag-back { font-family: var(--f-body); font-size: 14px; color: var(--mid); padding: 10px 4px; transition: color 0.2s; }
.diag-back:hover { color: var(--ink); }
.diag-next {
	font-family: var(--f-body); font-weight: 500; font-size: 15px; color: #fff; background: var(--db);
	padding: 13px 28px; border-radius: 6px; transition: background 0.3s, opacity 0.3s;
}
.diag-next:hover { background: var(--db-dark); }
.diag-next:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Email capture --------------------------------------------- */
.diag-screen--email { min-height: 56vh; }
.diag-capture { max-width: 520px; margin: 0 auto; text-align: center; }
.diag-capture__title { font-family: var(--f-display); font-style: italic; font-weight: 400; font-size: 48px; line-height: 1.06; color: var(--ink); margin-bottom: 16px; }
.diag-capture__sub { font-family: var(--f-body); font-weight: 300; font-size: 17px; line-height: 1.6; color: var(--mid); margin-bottom: 34px; }
.diag-form { text-align: left; }
.diag-field { margin-bottom: 18px; }
.diag-field label { display: block; font-family: var(--f-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--mid); margin-bottom: 8px; }
.diag-field input, .diag-select select {
	width: 100%; padding: 14px 16px; font-family: var(--f-body); font-size: 16px; color: var(--ink);
	background: var(--white); border: 1px solid var(--border); border-radius: 8px; transition: border-color 0.2s, box-shadow 0.2s;
}
.diag-field input:focus, .diag-select select:focus { outline: none; border-color: var(--db); box-shadow: 0 0 0 3px rgba(37,99,235,0.14); }
.diag-field input.has-error, .diag-select select.has-error { border-color: #C0392B; }
.diag-field__err { display: block; font-family: var(--f-body); font-size: 12px; color: #C0392B; margin-top: 5px; min-height: 14px; }
.diag-select { position: relative; }
.diag-select::after { content: ''; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; border: solid var(--mid); border-width: 0 1.5px 1.5px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.diag-select select { appearance: none; -webkit-appearance: none; }
.diag-form__note { text-align: center; font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.05em; color: var(--mid); margin-top: 16px; }
.diag-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Results: gauge -------------------------------------------- */
.diag-screen--results { max-width: 720px; }
.diag-results__top { text-align: center; margin-bottom: 56px; }
.diag-gauge { position: relative; width: 220px; height: 220px; margin: 0 auto 24px; }
.diag-gauge__svg { width: 220px; height: 220px; transform: rotate(-90deg); }
.diag-gauge__track { fill: none; stroke: var(--warm-grey); stroke-width: 12; }
.diag-gauge__meter { fill: none; stroke: var(--db); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset 1.5s var(--ease); }
.diag-gauge__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.diag-gauge__num { font-family: var(--f-display); font-style: italic; font-weight: 400; font-size: 80px; line-height: 1; color: var(--ink); }
.diag-gauge__of { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.18em; color: var(--mid); margin-top: 6px; }
.diag-tier { font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--db); margin-bottom: 10px; }
.diag-tier__desc { font-family: var(--f-body); font-weight: 300; font-size: 19px; line-height: 1.6; color: var(--ink); max-width: 520px; margin: 0 auto; }

/* ---------- Results: bars --------------------------------------------- */
.diag-bars { margin-bottom: 64px; }
.diag-bars__head { font-family: var(--f-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--mid); margin-bottom: 20px; }
.diag-bar { display: grid; grid-template-columns: 150px 1fr 56px; align-items: center; gap: 16px; margin-bottom: 16px; }
.diag-bar__label { font-family: var(--f-body); font-weight: 500; font-size: 14px; color: var(--ink); }
.diag-bar__track { height: 8px; background: var(--warm-grey); border-radius: 5px; overflow: hidden; }
.diag-bar__fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--db), var(--db-dark)); border-radius: 5px; transition: width 1s var(--ease); }
.diag-bar__val { font-family: var(--f-mono); font-size: 14px; color: var(--ink); text-align: right; }
.diag-bar__val i { color: var(--light); font-style: normal; font-size: 11px; }

/* ---------- Results: insights ----------------------------------------- */
.diag-insights { margin-bottom: 60px; }
.diag-insights__title, .diag-next__title { font-family: var(--f-display); font-style: italic; font-weight: 400; font-size: 34px; color: var(--ink); margin-bottom: 26px; }
.diag-insight { display: flex; gap: 18px; padding: 24px 0; border-top: 1px solid var(--border); }
.diag-insight:last-child { border-bottom: 1px solid var(--border); }
.diag-insight__icon { flex: 0 0 auto; width: 40px; height: 40px; color: var(--db); }
.diag-insight__icon svg { width: 40px; height: 40px; }
.diag-insight__body h3 { font-family: var(--f-body); font-weight: 600; font-size: 17px; color: var(--ink); margin-bottom: 8px; }
.diag-insight__body p { font-family: var(--f-body); font-weight: 300; font-size: 15px; line-height: 1.65; color: var(--mid); }

/* ---------- Results: recommended service ------------------------------ */
.diag-rec { margin-bottom: 64px; }
.diag-rec__card { background: var(--db-light); border: 1px solid var(--db-border); border-radius: 14px; padding: 40px; text-align: center; }
.diag-rec__eyebrow { font-family: var(--f-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--db); }
.diag-rec__name { font-family: var(--f-display); font-style: italic; font-weight: 400; font-size: 40px; color: var(--ink); margin: 12px 0 16px; }
.diag-rec__desc { font-family: var(--f-body); font-weight: 300; font-size: 16px; line-height: 1.7; color: var(--mid); max-width: 540px; margin: 0 auto 14px; }
.diag-rec__note { font-family: var(--f-body); font-weight: 500; font-size: 15px; color: var(--ink); margin-bottom: 24px; }

/* ---------- Results: next steps --------------------------------------- */
.diag-next__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 64px; }
.diag-next__card { padding: 28px 24px; border: 1px solid var(--border); border-radius: 12px; }
.diag-next__card h3 { font-family: var(--f-body); font-weight: 600; font-size: 16px; color: var(--ink); margin-bottom: 10px; }
.diag-next__card p { font-family: var(--f-body); font-weight: 300; font-size: 14px; line-height: 1.6; color: var(--mid); margin-bottom: 14px; }
.diag-link { font-family: var(--f-body); font-weight: 500; font-size: 14px; color: var(--db); }
.diag-link:hover { color: var(--db-dark); }

/* ---------- Results: share -------------------------------------------- */
.diag-share { text-align: center; padding-top: 40px; border-top: 1px solid var(--border); }
.diag-share__label { display: block; font-family: var(--f-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--mid); margin-bottom: 18px; }
.diag-share__btns { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.diag-share__btn {
	font-family: var(--f-body); font-weight: 500; font-size: 14px; color: var(--ink);
	padding: 11px 22px; border: 1px solid var(--border); border-radius: 6px; background: var(--white);
	transition: border-color 0.2s, color 0.2s;
}
.diag-share__btn:hover { border-color: var(--db); color: var(--db); }

/* ---------- Reduced motion -------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.diag-screen, .diag-gauge__meter, .diag-bar__fill, .diag-btn { transition: none !important; }
	.diag-btn__spin { animation: none; }
}

/* ---------- Responsive / mobile --------------------------------------- */
@media (max-width: 720px) {
	.diag-top { padding: 18px 20px; }
	.diag-top__brand { font-size: 22px; }
	.diag-progress { top: 57px; }
	.diag-stage { padding: 36px 20px 80px; }
	.diag-landing__title { font-size: 42px; }
	.diag-landing__sub { font-size: 16px; }
	.diag-q__title { font-size: 28px; }
	.diag-opt { min-height: 56px; font-size: 15px; padding: 14px 16px; }
	.diag-capture__title { font-size: 34px; }
	.diag-gauge, .diag-gauge__svg { width: 160px; height: 160px; }
	.diag-gauge__num { font-size: 58px; }
	.diag-bar { grid-template-columns: 110px 1fr 48px; gap: 10px; }
	.diag-bar__label { font-size: 12px; }
	.diag-insights__title, .diag-next__title { font-size: 28px; }
	.diag-rec__card { padding: 28px 22px; }
	.diag-rec__name { font-size: 32px; }
	.diag-next__grid { grid-template-columns: 1fr; }
	.diag-btn--lg { width: 100%; }
}
