/* =========================================================
   SPARK OF CLARITY — Business Clarity Diagnostic
   style.css
   Brand tokens live at :root. Never hardcode brand colors
   inside component rules — reference the variables.
   ========================================================= */

:root {
  /* Brand palette */
  --navy: #1C2140;
  --teal: #234F5A;
  --slate-blue: #C7D9E1;
  --gold-visual: #C49A2C;   /* decorative use only — fails AA on light backgrounds */
  --gold-text: #8A6800;     /* WCAG-safe gold for text/icons on Warm Paper */
  --paper: #F5F2EC;
  --charcoal: #222222;
  --white: #FFFFFF;

  /* Semantic tokens */
  --bg: var(--paper);
  --surface: var(--white);
  --text-primary: var(--charcoal);
  --text-inverse: var(--paper);
  --border: rgba(28, 33, 64, 0.12);
  --focus-ring: #0B6E99;

  /* Type */
  --font-display: 'Prata', serif;
  --font-body: 'Thasadith', sans-serif;

  /* Spacing scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;

  /* Layout */
  --radius: 14px;
  --radius-pill: 999px;
  --max-width: 760px;
  --shadow-card: 0 8px 24px rgba(28, 33, 64, 0.08);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 var(--space-2);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 var(--space-2); }

a { color: var(--teal); }

img { max-width: 100%; display: block; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-4) var(--space-3);
}

.site-header {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header .container {
  padding: var(--space-2) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--gold-text);
  margin-bottom: var(--space-1);
  display: inline-block;
}

/* ---------- Buttons ---------- */
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.75rem;
  background: var(--teal);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
  min-height: 48px;
}

.primary-btn:hover { background: #1b3d46; box-shadow: 0 6px 16px rgba(35, 79, 90, 0.28); }
.primary-btn:active { transform: translateY(1px); }
.primary-btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.5rem;
  background: transparent;
  color: var(--navy);
  font-family: var(--font-body);
  font-weight: 700;
  border: 1.5px solid var(--navy);
  border-radius: var(--radius-pill);
  cursor: pointer;
  min-height: 48px;
  transition: background 120ms ease;
}

.secondary-btn:hover { background: rgba(28, 33, 64, 0.05); }

.text-link-btn {
  background: none;
  border: none;
  color: var(--teal);
  font-family: var(--font-body);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0.5rem;
  min-height: 44px;
}

/* Visible focus state everywhere, including reduced-motion contexts */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ---------- Hero (index.html) ---------- */
.hero {
  padding: var(--space-5) var(--space-3);
  text-align: left;
}

.hero p.lede {
  font-size: 1.15rem;
  max-width: 55ch;
}

.hero-actions { margin-top: var(--space-3); }

.value-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--border);
}

.value-strip .value-item h3 { color: var(--navy); }
.value-strip .value-item p { color: var(--charcoal); }

@media (min-width: 768px) {
  .value-strip { grid-template-columns: repeat(3, 1fr); }
}

.mini-cta {
  background: var(--navy);
  color: var(--text-inverse);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-3);
  text-align: center;
  margin-top: var(--space-4);
}

.mini-cta h2 { color: var(--white); }
.mini-cta p { color: var(--slate-blue); max-width: 50ch; margin-left: auto; margin-right: auto; }

/* ---------- Progress tracker ---------- */
.progress-wrap {
  padding: var(--space-2) var(--space-3) 0;
}

.progress-track {
  height: 8px;
  background: var(--slate-blue);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--teal);
  border-radius: var(--radius-pill);
  transition: width 240ms ease;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--teal);
  margin-top: var(--space-1);
  font-weight: 700;
}

/* ---------- Diagnostic flow ---------- */
.diagnostic-shell {
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
}

.question-stage {
  flex: 1;
  display: flex;
  align-items: center;
}

.question-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: var(--space-4) var(--space-3);
  width: 100%;
}

.section-intro {
  text-align: center;
}

.section-intro h2 { margin-bottom: var(--space-2); }

.question-text {
  font-family: var(--font-display);
  color: var(--navy);
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  margin-bottom: var(--space-3);
}

/* Likert scale — large tap targets, works as a fieldset of radios */
.likert-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.likert-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.9rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
  min-height: 48px;
}

.likert-option:hover { border-color: var(--teal); }

.likert-option input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--teal);
  flex-shrink: 0;
}

.likert-option.is-selected {
  border-color: var(--teal);
  background: rgba(35, 79, 90, 0.06);
}

.likert-option .likert-value {
  font-weight: 700;
  color: var(--navy);
  width: 1.5rem;
}

@media (min-width: 600px) {
  .likert-group { flex-direction: row; flex-wrap: wrap; }
  .likert-option { flex-direction: column; text-align: center; flex: 1 1 18%; }
}

/* Profile question inputs */
.field-group { margin-bottom: var(--space-3); }

label.field-label {
  display: block;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: var(--space-1);
}

select.field-input,
input.field-input,
textarea.field-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-primary);
  min-height: 48px;
}

textarea.field-input { min-height: 110px; resize: vertical; }

.field-hint { font-size: 0.85rem; color: #5b5b5b; margin-top: var(--space-1); }

/* Nav row */
.question-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-4);
  gap: var(--space-2);
}

.question-nav .spacer { flex: 1; }

/* ---------- Results / Snapshot ---------- */
.score-hero {
  text-align: center;
  padding: var(--space-4) var(--space-3);
  background: var(--navy);
  border-radius: var(--radius);
  color: var(--text-inverse);
}

.score-hero .eyebrow { color: var(--slate-blue); }

.score-number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 4.5rem);
  color: var(--white);
  line-height: 1;
  margin: var(--space-2) 0;
}

.score-out-of { color: var(--slate-blue); font-size: 1rem; }

.growth-stage-pill {
  display: inline-block;
  margin-top: var(--space-2);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  background: rgba(196, 154, 44, 0.18);
  color: var(--gold-visual);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  border: 1px solid rgba(196, 154, 44, 0.4);
}

.snapshot-section {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
}

.snapshot-section:last-of-type { border-bottom: none; }

.dimension-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.dimension-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  background: var(--surface);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.dimension-row .dimension-name { font-weight: 700; color: var(--navy); }
.dimension-row .dimension-score { font-family: var(--font-display); color: var(--teal); }

.focus-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: focus-counter;
  display: grid;
  gap: var(--space-2);
}

.focus-list li {
  counter-increment: focus-counter;
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2);
  background: var(--surface);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.focus-list li::before {
  content: counter(focus-counter);
  font-family: var(--font-display);
  color: var(--gold-text);
  font-size: 1.3rem;
  flex-shrink: 0;
}

/* CTA section */
.cta-section {
  background: var(--slate-blue);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-3);
  margin-top: var(--space-4);
}

.cta-section ul { padding-left: 1.2rem; margin: var(--space-2) 0; }
.cta-section li { margin-bottom: 0.4rem; }

/* Email capture */
.email-capture {
  margin-top: var(--space-4);
  padding: var(--space-3);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
}

.email-capture form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

@media (min-width: 600px) {
  .email-capture form { flex-direction: row; }
  .email-capture input.field-input { flex: 1; }
}

.form-status {
  font-size: 0.9rem;
  margin-top: var(--space-1);
}

.form-status[data-state="success"] { color: var(--teal); }
.form-status[data-state="error"] { color: #a12a2a; }

/* ---------- Footer ---------- */
.site-footer {
  padding: var(--space-3);
  text-align: center;
  color: #5b5b5b;
  font-size: 0.85rem;
}

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  border-radius: 0 0 8px 0;
}

.skip-link:focus { left: 0; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
