/* ============================================================
   AIM Assessment — assess.css
   ============================================================ */

:root {
  --navy:       #1A3A6B;
  --navy-dark:  #112648;
  --rose:       #D4357A;
  --rose-light: rgba(212,53,122,0.10);
  --anthracite: #262626;
  --pebble:     #BDBBB0;
  --cloud:      #E8E7E3;
  --offwhite:   #F5F4F1;
  --surface:    #FAFAF8;
  --white:      #FFFFFF;
  --text:       #2E2E2E;
  --text-muted: #666666;
  --success:    #2E7D5E;
  --error:      #C0392B;
  --radius:     8px;
  --radius-lg:  14px;
  --shadow-sm:  0 2px 8px rgba(26,58,107,0.08);
  --shadow-md:  0 6px 24px rgba(26,58,107,0.13);
  --t:          0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--offwhite);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}

/* ── PROGRESS BAR ── */
#progressWrap {
  background: var(--white);
  border-bottom: 1px solid var(--cloud);
  padding: 0.6rem 1.5rem 0.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  width: 100%;
}
#progressBar {
  background: var(--cloud);
  height: 6px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}
#progressFill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy), var(--rose));
  border-radius: 4px;
  transition: width 0.38s ease;
  width: 0%;
}
#progressLabel {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy);
  text-align: center;
  letter-spacing: 0.02em;
}

/* ── SCREENS ── */
.screen {
  display: none;
  max-width: 660px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  animation: fadeUp 0.32s ease;
}
.screen.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.screen-inner {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--cloud);
  padding: 2.5rem 2.75rem;
}
.screen-center { text-align: center; }

/* ── BRAND HEADER ── */
.brand-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}
.brand-logo { height: 36px; width: auto; }
.brand-logo-sm { height: 28px; width: auto; }
.brand-divider { width: 1px; height: 26px; background: var(--cloud); }
.brand-aim {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── TYPOGRAPHY ── */
.screen-title {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.screen-sub {
  font-size: 0.97rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  line-height: 1.7;
}
.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 0.65rem;
}

/* ── FORMS ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1.25rem;
}
.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--anthracite);
  letter-spacing: 0.02em;
}
.form-group input {
  width: 100%;
  padding: 0.78rem 1rem;
  border: 1.5px solid var(--cloud);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.form-group input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,58,107,0.10);
}
.form-group input.error { border-color: var(--error); }
.form-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.req { color: var(--rose); }
.field-err { font-size: 0.78rem; color: var(--error); min-height: 1.1em; }
.field-hint { font-size: 0.78rem; color: var(--text-muted); font-style: italic; }
.privacy-note {
  display: flex; align-items: flex-start; gap: 0.5rem;
  font-size: 0.8rem; color: var(--text-muted); line-height: 1.5;
  margin-bottom: 1.5rem; padding: 0.75rem 1rem;
  background: var(--offwhite); border-radius: var(--radius); border: 1px solid var(--cloud);
}
.privacy-note svg { flex-shrink: 0; margin-top: 1px; }

/* ── INTRO SCREEN ── */
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; margin: 1.25rem 0 1.75rem; }
.intro-card { background: var(--offwhite); border: 1px solid var(--cloud); border-radius: var(--radius); padding: 1rem 1.1rem; text-align: center; }
.intro-icon { font-size: 1.4rem; margin-bottom: 0.4rem; }
.intro-card-title { font-size: 0.88rem; font-weight: 700; color: var(--navy); margin-bottom: 0.25rem; }
.intro-card-body { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }
.intro-dims { margin: 1.5rem 0; }
.intro-dims h3 { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--navy); margin-bottom: 0.85rem; }
.dim-row { display: flex; align-items: flex-start; gap: 0.85rem; margin-bottom: 0.85rem; }
.dim-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.dot-s { background: #1A3A6B; }
.dot-r { background: #D4357A; }
.dot-m { background: #2E7D5E; }
.dim-row strong { font-size: 0.88rem; color: var(--anthracite); display: block; margin-bottom: 0.1rem; }
.dim-row p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }
.intro-note {
  background: var(--rose-light); border-left: 3px solid var(--rose);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.85rem 1.1rem; font-size: 0.88rem; color: var(--anthracite);
  margin-bottom: 1.75rem; line-height: 1.6;
}

/* ── QUESTION SCREEN ── */
.q-area-tag {
  display: inline-block; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  background: rgba(26,58,107,0.08); color: var(--navy);
  padding: 0.25rem 0.85rem; border-radius: 20px; margin-bottom: 1.1rem;
}
.q-text {
  font-size: clamp(1.02rem, 2.2vw, 1.18rem);
  font-weight: 700; color: var(--anthracite); line-height: 1.5; margin-bottom: 1.75rem;
}

/* ── RADIO OPTIONS ── */
.options-list { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: 2rem; }
.radio-option {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.88rem 1.2rem;
  background: var(--white); border: 1.5px solid var(--cloud); border-radius: var(--radius);
  font-size: 0.95rem; color: var(--text); cursor: pointer;
  transition: border-color var(--t), background var(--t), transform var(--t);
  user-select: none;
}
.radio-option:hover { border-color: var(--navy); background: rgba(26,58,107,0.04); transform: translateX(3px); }
.radio-option.selected { border-color: var(--navy); background: rgba(26,58,107,0.08); font-weight: 600; color: var(--navy); }
.radio-circle {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--pebble);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  transition: border-color var(--t);
}
.radio-option:hover .radio-circle,
.radio-option.selected .radio-circle { border-color: var(--navy); }
.radio-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--navy); display: block; }
.radio-label { flex: 1; line-height: 1.4; }

/* ── NAV BUTTONS ── */
.q-nav { display: flex; justify-content: flex-start; align-items: center; gap: 1rem; padding-top: 0.5rem; }
#nextBtn { display: none !important; }

/* ── CALCULATING SCREEN ── */
.spinner {
  width: 52px; height: 52px; border: 4px solid var(--cloud); border-top-color: var(--navy);
  border-radius: 50%; animation: spin 0.9s linear infinite; margin: 2rem auto 1.5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.calc-title { font-size: 1.3rem; font-weight: 700; color: var(--navy); margin-bottom: 0.5rem; }
.calc-sub { color: var(--text-muted); font-size: 0.93rem; }

/* ── RESULTS SCREEN ── */
.results-header {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  color: var(--white); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 2rem 2.75rem 1.75rem; margin: -2.5rem -2.75rem 2rem;
}
.results-header-brand { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.results-header-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.55); }
.archetype-block { margin-bottom: 0.5rem; }
.archetype-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(212,53,122,0.9); margin-bottom: 0.4rem; }
.archetype-name { font-size: clamp(1.3rem, 2.8vw, 1.75rem); font-weight: 800; color: var(--white); line-height: 1.2; margin-bottom: 0.5rem; }
.archetype-meta { display: flex; align-items: center; gap: 0.85rem; flex-wrap: wrap; }
.overall-score { background: var(--rose); color: var(--white); font-size: 1.2rem; font-weight: 900; padding: 0.3rem 1rem; border-radius: 30px; }
.confidence-badge { font-size: 0.75rem; font-weight: 700; padding: 0.25rem 0.75rem; border-radius: 20px; background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.85); letter-spacing: 0.05em; }
.anomaly-note { background: rgba(255,193,7,0.08); border: 1px solid rgba(255,193,7,0.35); border-radius: var(--radius); padding: 0.85rem 1.1rem; font-size: 0.85rem; color: #5a4a00; margin-bottom: 1.5rem; line-height: 1.6; }
.radar-wrap { background: var(--offwhite); border: 1px solid var(--cloud); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 2rem; display: flex; justify-content: center; }
.radar-wrap canvas { max-width: 320px; max-height: 320px; }
.area-scores { display: flex; flex-direction: column; gap: 0.85rem; margin-bottom: 2rem; }
.area-score-row { display: flex; align-items: center; gap: 1rem; }
.area-score-name { font-size: 0.83rem; font-weight: 600; color: var(--anthracite); min-width: 200px; flex-shrink: 0; }
.area-score-bar-wrap { flex: 1; background: var(--cloud); border-radius: 4px; height: 8px; overflow: hidden; }
.area-score-bar { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--navy), var(--rose)); transition: width 1s ease; }
.area-score-pct { font-size: 0.88rem; font-weight: 700; color: var(--navy); min-width: 40px; text-align: right; }
.area-score-band { font-size: 0.75rem; color: var(--text-muted); min-width: 72px; }
.insights-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.75rem; }
.insight-box { background: var(--offwhite); border: 1px solid var(--cloud); border-radius: var(--radius); padding: 1rem 1.1rem; }
.ib-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rose); margin-bottom: 0.3rem; }
.ib-value { font-size: 0.92rem; font-weight: 700; color: var(--navy); line-height: 1.35; }
.narrative-block { border-left: 3px solid var(--navy); padding-left: 1.25rem; margin-bottom: 1.75rem; display: flex; flex-direction: column; gap: 1.25rem; }
.narrative-heading { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--navy); margin-bottom: 0.35rem; }
.narrative-text { font-size: 0.93rem; color: var(--text); line-height: 1.7; }
.email-sent-msg { background: rgba(46,125,94,0.09); border: 1px solid rgba(46,125,94,0.3); border-radius: var(--radius); padding: 0.85rem 1.1rem; font-size: 0.88rem; color: var(--success); font-weight: 600; margin-bottom: 1.25rem; text-align: center; }
.pdf-section { margin-bottom: 1.5rem; text-align: center; }
.cta-block { background: linear-gradient(135deg, var(--navy-dark), var(--navy)); border-radius: var(--radius); padding: 1.75rem 2rem; color: var(--white); margin-bottom: 1.5rem; }
.cta-heading { font-size: 1rem; font-weight: 800; color: var(--white); margin-bottom: 0.5rem; }
.cta-body { font-size: 0.88rem; color: rgba(255,255,255,0.78); margin-bottom: 1.1rem; line-height: 1.65; }
.cta-btn-row { display: flex; gap: 0.85rem; flex-wrap: wrap; }
.cta-contact { font-size: 0.8rem; color: rgba(255,255,255,0.5); margin-top: 0.75rem; }
.cta-contact a { color: rgba(212,53,122,0.9); text-decoration: none; font-weight: 600; }
.cta-contact a:hover { text-decoration: underline; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  font-family: inherit; font-weight: 700; font-size: 0.95rem;
  padding: 0.82rem 1.75rem; border-radius: 30px; border: none; cursor: pointer;
  text-decoration: none; transition: transform var(--t), box-shadow var(--t), background var(--t);
  white-space: nowrap;
}
.btn-primary { background: var(--rose); color: var(--white); box-shadow: 0 4px 16px rgba(212,53,122,0.3); }
.btn-primary:hover { background: #b82d68; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(212,53,122,0.42); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--cloud); }
.btn-ghost:hover { background: var(--offwhite); border-color: var(--pebble); }
.btn-ghost-white { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,0.35); }
.btn-ghost-white:hover { background: rgba(255,255,255,0.1); }
.btn-full { width: 100%; }
.btn-wide { min-width: 260px; }
.btn-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.5rem; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .screen-inner { padding: 1.75rem 1.25rem; }
  .results-header { padding: 1.5rem 1.25rem 1.25rem; margin: -1.75rem -1.25rem 1.5rem; }
  .form-row.two-col { grid-template-columns: 1fr; }
  .insights-row { grid-template-columns: 1fr; }
  .area-score-name { min-width: 130px; font-size: 0.78rem; }
  .cta-btn-row { flex-direction: column; }
  .btn-row .btn { width: 100%; }
}
@media (max-width: 420px) {
  .intro-grid { grid-template-columns: 1fr; }
  .area-score-band { display: none; }
}
