/* ============================================================
   Change Catalyst — LifePointe Greater Lekki
   Built on the official LifePointe Design System tokens
   (tokens/colors.css, typography.css, spacing.css).
   Balance 60·30·10 — cream/white · burnt orange · accents.
   Body text is always Warm Ink on cream/white; lemon & amber
   are decorative only, never text on light.
   ============================================================ */

:root {
  /* ---- DS base palette ---- */
  --color-orange:      #DD5D20;
  --color-orange-deep: #C24E16;
  --color-amber:       #F79000;
  --color-lemon:       #B6DF19;   /* decorative ONLY, never text */
  --color-brown:       #7A3B12;
  --color-red:         #D5341A;
  --color-purple:      #6B3FA0;
  --color-ink:         #241813;
  --color-cream:       #FBF4EA;
  --color-cream-deep:  #EFE3CF;
  --color-white:       #ffffff;

  /* ---- DS semantic aliases ---- */
  --surface-page:  var(--color-cream);
  --surface-card:  var(--color-white);
  --surface-muted: var(--color-cream-deep);
  --surface-brand: var(--color-orange);
  --surface-ink:   var(--color-ink);
  --text-body:     var(--color-ink);
  --text-muted:    var(--color-brown);
  --text-on-brand: var(--color-white);
  --action-primary:       var(--color-orange);
  --action-primary-hover: var(--color-orange-deep);
  --border-subtle: var(--color-cream-deep);
  --state-danger:  var(--color-red);

  /* ---- Component tokens mapped to DS roles ---- */
  --color-primary:      var(--action-primary);
  --color-primary-dark: var(--action-primary-hover);
  --color-dark:         var(--color-ink);
  --color-accent:       var(--color-amber);
  --color-primary-tint: #fae3d3;   /* soft orange fill (backgrounds only) */
  --color-accent-tint:  #feeecc;   /* soft amber fill (backgrounds only) */
  --color-bg:           var(--surface-card);
  --color-surface:      var(--surface-page);
  --color-border:       var(--border-subtle);
  --color-text:         var(--text-body);
  --color-text-muted:   var(--text-muted);
  --color-text-light:   var(--text-on-brand);

  /* Category accents — warm LifePointe family (used as fills/rings) */
  --cat-see: #DD5D20;
  --cat-feel: #D5341A;
  --cat-decide: #6B3FA0;
  --cat-act: #C24E16;
  --cat-evaluate: #7A3B12;
  --cat-capstone: #a03f12;

  /* ---- Radii (DS) ---- */
  --radius-input: 14px;
  --radius-card:  18px;
  --radius-panel: 28px;
  --radius-pill:  999px;
  --radius-md: var(--radius-input);
  --radius-lg: var(--radius-card);
  --radius-xl: var(--radius-card);
  --radius-2xl: var(--radius-panel);
  --radius-full: var(--radius-pill);

  /* ---- Shadows (DS — warm-brown tint, never grey/blue) ---- */
  --shadow-card:   0 30px 80px -30px rgba(60, 30, 10, 0.45);
  --shadow-button: 0 8px 20px -8px rgba(221, 93, 32, 0.7);
  --shadow-soft:   0 12px 30px -18px rgba(60, 30, 10, 0.35);
  --shadow-lg:     var(--shadow-card);

  /* ---- Type (DS) ---- */
  --font-sans:    "Quicksand", "Trebuchet MS", system-ui, sans-serif;
  --font-heading: "Amaranth", "Quicksand", system-ui, sans-serif;   /* headings */
  --font-ui:      "Quicksand", "Trebuchet MS", system-ui, sans-serif; /* buttons/labels */
  --font-display: "Amaranth", "Quicksand", system-ui, sans-serif;
  --font-script:  "Pacifico", cursive;
  --tracking-kicker: 0.16em;

  --ease-out-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-surface);
  min-height: 100dvh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* Signature background flourish: oversized circle / ring motifs, low opacity,
   bleeding off the page edges. No busy gradients. */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
}
body::before {           /* filled soft-orange circle, top-right, bleeding off */
  width: 460px; height: 460px;
  top: -190px; right: -160px;
  background: var(--color-primary-tint);
  opacity: 0.55;
}
body::after {            /* lemon ring, bottom-left, bleeding off */
  width: 380px; height: 380px;
  bottom: -170px; left: -150px;
  border: 26px solid var(--color-lemon);
  opacity: 0.18;
}

[x-cloak] { display: none !important; }

/* ---------- Layout ---------- */
.page {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(16px, 4vw, 32px) clamp(16px, 4vw, 24px) 64px;
}

.brandbar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0 24px;
}
.brandbar img { height: 52px; width: auto; display: block; }

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-card);
  padding: clamp(22px, 5vw, 40px);
}

/* ---------- Typography ---------- */
.h-display { font-family: var(--font-display); font-weight: 700; line-height: 1.08; }
.h-heading { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; }
.script-accent {
  font-family: var(--font-script);
  color: var(--color-primary);
  font-size: clamp(1.4rem, 5vw, 2rem);
  line-height: 1.1;
}

/* Kicker: short uppercase label + lemon dot (DS signature) */
.eyebrow {
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: var(--tracking-kicker);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-lemon);
  flex: none;
}
.eyebrow.center { justify-content: center; }
.muted { color: var(--color-text-muted); }
.center { text-align: center; }

/* ---------- Buttons (pill, sentence case) ---------- */
.btn {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius-pill);
  padding: 14px 28px;
  min-height: 44px;
  cursor: pointer;
  transition: transform 0.15s var(--ease-out-smooth), box-shadow 0.2s, background 0.2s, opacity 0.2s, color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-light);
  box-shadow: var(--shadow-button);
}
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-ghost:hover { background: var(--color-primary); color: var(--color-text-light); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 34px; font-size: 1.05rem; }

/* ---------- Progress ---------- */
.progress {
  height: 8px;
  background: var(--color-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 6px;
}
.progress > span {
  display: block;
  height: 100%;
  background: var(--color-primary);
  border-radius: inherit;
  transition: width 0.4s var(--ease-out-smooth);
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-weight: 600;
  margin-bottom: 22px;
}

/* ---------- Category chip (short uppercase label) ---------- */
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: var(--tracking-kicker);
  text-transform: uppercase;
  font-size: 0.8rem;
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}
.cat-sub { color: var(--color-text-muted); font-size: 0.9rem; margin-top: 8px; }

/* ---------- Statement ---------- */
.statement {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.2rem, 3.6vw, 1.55rem);
  line-height: 1.25;
  margin: 18px 0 26px;
}

/* ---------- Rating buttons ---------- */
.ratings { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.rating {
  position: relative;
  border: 2px solid var(--color-border);
  background: var(--color-bg);
  border-radius: var(--radius-card);
  padding: 16px 4px 12px;
  cursor: pointer;
  text-align: center;
  min-height: 44px;
  transition: transform 0.15s var(--ease-out-smooth), border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.rating:hover { border-color: var(--color-primary); transform: translateY(-2px); }
.rating .num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--color-primary);
  display: block;
  line-height: 1;
}
.rating .lbl {
  display: block;
  font-size: 0.66rem;
  color: var(--color-text-muted);
  margin-top: 8px;
  font-weight: 600;
  min-height: 1.8em;
}
.rating.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-tint);
  box-shadow: var(--shadow-button);
}

.nav-row { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; gap: 12px; }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 7px;
}
.field .req { color: var(--state-danger); }
.input, .textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-input);
  padding: 12px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-tint);
}
.textarea { resize: vertical; min-height: 92px; }
.field-error { color: var(--state-danger); font-size: 0.8rem; margin-top: 6px; font-weight: 600; }
.hint { color: var(--color-text-muted); font-size: 0.85rem; margin-top: 4px; }

.consent { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 22px; }
.consent input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--color-primary); flex: none; }
.consent label { font-size: 0.9rem; color: var(--color-text-muted); }

.subcard {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 22px;
  margin-bottom: 18px;
}
.subcard h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 4px;
}

/* ---------- Results ---------- */
.score-hero { text-align: center; padding: 8px 0 6px; }
.score-big {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.4rem, 16vw, 5.5rem);
  color: var(--color-primary);
  line-height: 1;
}
.score-big small { font-size: 0.34em; color: var(--color-text-muted); font-family: var(--font-ui); font-weight: 700; }
.band-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 5vw, 2rem);
  color: var(--color-primary-dark);
  margin-top: 6px;
}
.band-meaning { color: var(--color-text-muted); margin-top: 8px; }

.band-scale { display: flex; gap: 4px; margin: 22px 0 6px; }
.band-scale .seg { flex: 1; height: 8px; border-radius: var(--radius-pill); background: var(--color-border); }
.band-scale .seg.on { background: var(--color-primary); }
.band-scale-labels { display: flex; justify-content: space-between; font-size: 0.62rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }

.breakdown { margin-top: 26px; }
.breakdown h3 { font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem; margin-bottom: 14px; }
.bar-row { margin-bottom: 16px; }
.bar-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.bar-head .name { font-family: var(--font-ui); font-weight: 700; font-size: 0.92rem; }
.bar-head .val { font-size: 0.82rem; color: var(--color-text-muted); font-weight: 600; }
.bar-track { height: 12px; background: var(--color-border); border-radius: var(--radius-pill); overflow: hidden; }
.bar-fill { height: 100%; border-radius: inherit; transition: width 0.8s var(--ease-out-smooth); }
.bar-row.lowest .bar-head .name::after {
  content: "Growth edge";
  margin-left: 8px;
  font-size: 0.6rem;
  font-weight: 700;
  background: var(--color-primary-tint);
  color: var(--color-primary-dark);   /* orange text, not amber */
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
  vertical-align: middle;
  text-transform: none;
}

.callout {
  background: var(--color-primary-tint);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  margin-top: 22px;
}
.callout.spiritual { background: var(--color-accent-tint); }
.callout .k {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: var(--tracking-kicker);
  color: var(--color-primary-dark);   /* orange kicker, never amber text */
  display: inline-flex; align-items: center; gap: 7px;
}
.callout .k::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--color-lemon); flex: none; }
.callout p { margin-top: 6px; }

.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.result-actions .btn { flex: 1 1 auto; }

.notice {
  border-radius: var(--radius-card);
  padding: 13px 16px;
  font-size: 0.88rem;
  margin-top: 18px;
}
.notice.ok { background: var(--color-primary-tint); border: 1px solid var(--color-cream-deep); color: var(--color-ink); }
.notice.warn { background: var(--color-accent-tint); border: 1px solid #f0d59a; color: var(--color-brown); }

/* ---------- Spinner ---------- */
.spinner {
  width: 20px; height: 20px;
  border: 3px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Fade transition ---------- */
.fade-enter { animation: fadeUp 0.35s var(--ease-out-smooth); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.footer-note { text-align: center; margin-top: 22px; font-size: 0.8rem; color: var(--color-text-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 420px) {
  .ratings { gap: 6px; }
  .rating { padding: 12px 2px 10px; }
  .rating .num { font-size: 1.3rem; }
  .rating .lbl { font-size: 0.58rem; }
}

/* ---------- Print ---------- */
@media print {
  body { background: #fff; }
  body::before, body::after { display: none; }
  .no-print { display: none !important; }
  .card { box-shadow: none; border: none; }
  .page { max-width: 100%; }
}
