/*
  ========================================================================
  FILE: waypoint-assessment/public/css/app.css
  ========================================================================
  PURPOSE: Brand styling for the assessment shell. Mobile-first, large
           tap targets per productContext.md (executives complete on
           phones).
  SCOPE:   Layout, typography, form controls, card selectors, integrity
           panel. Excludes any score visualisation (handled by Chart.js).
  AUTHOR:  2026-05-19 — AI Agent scaffold session
  ========================================================================
*/

:root {
  --w8-navy: #0a192f;
  --w8-navy-soft: #122a4a;
  --w8-cream: #f7f5ef;
  --w8-ink: #142037;
  --w8-muted: #5a6b85;
  --w8-line: #d8ddea;
  --w8-accent: #c8a951;
  --w8-error: #b3261e;
  --w8-success: #1e7a3c;
  --radius-lg: 14px;
  --radius-md: 10px;
  --shadow-sm: 0 1px 2px rgba(10, 25, 47, 0.08);
  --shadow-md: 0 6px 18px rgba(10, 25, 47, 0.08);
  font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--w8-cream);
  color: var(--w8-ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

#app {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem 6rem;
}

h1, h2, h3 {
  font-family: "Outfit", "Inter", sans-serif;
  color: var(--w8-navy);
  line-height: 1.2;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0 0 .5rem; }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin: 0 0 .4rem; }
.lede, .sub, .prime-sub { color: var(--w8-muted); margin: 0 0 1.25rem; }

/* ---------- Step scaffolding ---------- */
.step {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.75rem 1.5rem;
}

.progress {
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--w8-muted);
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.step-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 2rem;
}

.step-nav button {
  flex: 1;
  min-height: 48px;
  font-family: "Outfit", sans-serif;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid var(--w8-line);
  background: white;
  color: var(--w8-navy);
  cursor: pointer;
  font-size: 1rem;
}

.step-nav button.primary,
button.primary {
  background: var(--w8-navy);
  color: white;
  border-color: var(--w8-navy);
}

.step-nav button[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Fields ---------- */
.field {
  display: block;
  margin: 1.1rem 0;
}

.field > span,
.field > legend {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--w8-ink);
}

.field small {
  display: block;
  color: var(--w8-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

input[type="text"],
input[type="email"],
input:not([type]),
textarea,
select {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--w8-line);
  border-radius: var(--radius-md);
  background: white;
  color: var(--w8-ink);
}

input[type="range"] {
  width: 100%;
  margin-top: 0.25rem;
}

textarea { resize: vertical; min-height: 90px; }

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid var(--w8-navy);
  outline-offset: 1px;
}

/* ---------- Checkbox / radio / chips ---------- */
.field.check,
.check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.field.check input,
.check input { margin-top: 0.25rem; }

.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--w8-line);
  background: white;
  cursor: pointer;
  font-size: 0.95rem;
  min-height: 40px;
}
.chip input { accent-color: var(--w8-navy); }

/* ---------- Card selector ---------- */
fieldset.cards { border: 0; padding: 0; margin: 1.1rem 0; }
fieldset.cards legend { font-weight: 600; margin-bottom: 0.5rem; }
fieldset.cards .card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 1rem;
  margin: 0.4rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--w8-line);
  background: white;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  color: var(--w8-ink);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
fieldset.cards .card strong { display: block; margin-bottom: 0.15rem; }
fieldset.cards .card span { color: var(--w8-muted); font-size: 0.9rem; }
fieldset.cards .card:hover { border-color: var(--w8-navy); }
fieldset.cards .card.selected {
  border-color: var(--w8-navy);
  box-shadow: 0 0 0 2px var(--w8-navy);
}

/* ---------- Errors ---------- */
.error {
  color: var(--w8-error);
  background: #fdecea;
  border: 1px solid #f5b6b1;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  margin-top: 1rem;
  font-weight: 500;
}

/* ---------- Section 2 dark mode ---------- */
.section-future_forge { background: var(--w8-navy); color: var(--w8-cream); }
.section-future_forge .dark-section-title,
.section-future_forge h2,
.section-future_forge .progress,
.section-future_forge .field > span,
.section-future_forge .field > legend { color: var(--w8-cream); }
.section-future_forge .sub { color: rgba(247, 245, 239, 0.75); }
.section-future_forge .card { background: var(--w8-navy-soft); color: var(--w8-cream); border-color: rgba(247,245,239,0.2); }
.section-future_forge .card span { color: rgba(247,245,239,0.7); }
.section-future_forge .card.selected { border-color: var(--w8-accent); box-shadow: 0 0 0 2px var(--w8-accent); }
.section-future_forge input,
.section-future_forge textarea {
  background: var(--w8-navy-soft);
  color: var(--w8-cream);
  border-color: rgba(247,245,239,0.2);
}

/* ---------- Section 3 work wheel ---------- */
.work-wheel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 1rem 0 1.5rem;
}
.work-wheel .radar {
  height: 320px;
  background: white;
  border: 1px solid var(--w8-line);
  border-radius: var(--radius-md);
  padding: 0.75rem;
}

@media (min-width: 720px) {
  .work-wheel { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* ---------- Section 5 integrity notice ---------- */
.integrity-notice {
  background: var(--w8-navy);
  color: var(--w8-cream);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1rem 0 1.5rem;
}
.integrity-notice h3 { color: var(--w8-cream); margin: 0 0 .6rem; }
.integrity-notice p { margin: 0 0 .6rem; }
.integrity-notice .check {
  background: rgba(247, 245, 239, 0.08);
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  margin-top: 0.75rem;
}

.disclosure .detail { margin-top: 0.75rem; }

/* ---------- Section 7 stay slider colour band ---------- */
input[type="range"]#stay_likelihood {
  accent-color: var(--w8-navy);
}
/* NOTE: native slider gradient varies by browser. v1 keeps it simple and
   relies on the numeric output below the slider. */

/* ---------- Post-submit ---------- */
.step.done h1 { color: var(--w8-success); }
.step.done .preview {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.5rem;
  display: grid;
  gap: 0.5rem;
}
.step.done .preview li {
  background: var(--w8-cream);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 1.05rem;
}
.power-word-echo {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--w8-cream);
  border: 1px solid var(--w8-line);
}
