/* =========================================================================
   Recovery Readiness Score — design system
   Direction: the bridge between clinical and athletic. Deep clinical slate,
   bone text, an amber "readiness" gauge as the signature. Not a med-sterile
   white box, not a hype fitness neon. Trustworthy + momentum.
   ========================================================================= */

:root {
  --ink:        #0B1F2B;   /* deep clinical slate — page bg */
  --ink-2:      #123040;   /* raised panel */
  --ink-3:      #173948;   /* borders / tracks */
  --bone:       #F4F1EA;   /* primary text */
  --mist:       #96AEB8;   /* muted labels */
  --amber:      #F0B04A;   /* readiness accent */
  --amber-deep: #D8963A;
  --green:      #5EC491;   /* return-ready */
  --red:        #E07A6C;   /* at-risk / early */

  --maxw: 620px;
  --radius: 16px;
  --ease: cubic-bezier(0.4, 0.0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--ink);
  color: var(--bone);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  /* subtle depth: a soft radial from top */
  background-image: radial-gradient(120% 60% at 50% -10%,
                    rgba(240,176,74,0.08), transparent 60%);
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 22px 80px;
}

/* ---- Display type ------------------------------------------------------- */
.display {
  font-family: 'Archivo', 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.eyebrow {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mist);
}

/* ---- Hero --------------------------------------------------------------- */
.hero { padding: 18px 0 30px; }
.hero h1 {
  font-size: clamp(2rem, 8vw, 3rem);
  margin: 14px 0 16px;
}
.hero h1 .accent { color: var(--amber); }
.hero p {
  color: var(--mist);
  font-size: 1.08rem;
  max-width: 44ch;
}

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  background: var(--amber);
  border: none;
  border-radius: 999px;
  padding: 16px 30px;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease);
  width: 100%;
}
.btn:hover { background: var(--amber-deep); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.ghost {
  background: transparent;
  color: var(--bone);
  border: 1.5px solid var(--ink-3);
}
.btn.ghost:hover { background: var(--ink-2); }

/* ---- Panels ------------------------------------------------------------- */
.panel {
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
  border-radius: var(--radius);
  padding: 26px 22px;
}

/* ---- Quiz --------------------------------------------------------------- */
.stage { display: none; }
.stage.active { display: block; animation: rise 0.4s var(--ease); }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.progress-rail {
  height: 6px;
  background: var(--ink-3);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 26px;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--amber);
  border-radius: 99px;
  transition: width 0.4s var(--ease);
}

.q-count { color: var(--mist); font-size: 0.85rem; margin-bottom: 8px; }
.q-text {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.25;
  margin-bottom: 8px;
}
.q-help { color: var(--mist); font-size: 0.95rem; margin-bottom: 22px; }

.options { display: flex; flex-direction: column; gap: 12px; }
.option {
  text-align: left;
  background: var(--ink);
  border: 1.5px solid var(--ink-3);
  border-radius: 12px;
  padding: 16px 18px;
  color: var(--bone);
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), transform 0.1s var(--ease);
  line-height: 1.35;
}
.option:hover { border-color: var(--mist); }
.option.selected {
  border-color: var(--amber);
  background: rgba(240,176,74,0.08);
}
.option:active { transform: scale(0.99); }

.nav-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.nav-row .btn { width: auto; flex: 1; }

/* ---- Gauge (the signature) --------------------------------------------- */
.gauge-wrap { text-align: center; padding: 8px 0 4px; }
.gauge { position: relative; width: 260px; height: 260px; margin: 0 auto; }
.gauge svg { transform: rotate(0deg); width: 100%; height: 100%; }
.gauge-track { fill: none; stroke: var(--ink-3); stroke-width: 20; stroke-linecap: round; }
.gauge-fill {
  fill: none;
  stroke: var(--amber);
  stroke-width: 20;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s var(--ease), stroke 0.4s var(--ease);
}
.gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.gauge-num {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 4.2rem;
  line-height: 1;
  letter-spacing: -0.03em;
}
.gauge-of { color: var(--mist); font-size: 0.9rem; margin-top: 2px; }

.tier-pill {
  display: inline-block;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 999px;
  margin: 18px 0 6px;
}
.tier-pill.ready    { background: var(--green); color: var(--ink); }
.tier-pill.building { background: var(--amber); color: var(--ink); }
.tier-pill.at-risk,
.tier-pill.early    { background: var(--red);   color: var(--ink); }

.tier-headline {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  margin: 8px 0 6px;
}
.tier-framing { color: var(--mist); font-size: 1rem; }

/* ---- Domain bars -------------------------------------------------------- */
.bars { margin: 24px 0 4px; display: flex; flex-direction: column; gap: 14px; }
.bar-row { }
.bar-label {
  display: flex; justify-content: space-between;
  font-size: 0.9rem; margin-bottom: 6px;
}
.bar-label .name { color: var(--bone); text-transform: capitalize; }
.bar-label .val { color: var(--mist); font-variant-numeric: tabular-nums; }
.bar-track { height: 8px; background: var(--ink-3); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; width: 0; transition: width 0.9s var(--ease); }

/* ---- Email gate --------------------------------------------------------- */
.gate { text-align: center; }
.gate h3 { font-family:'Archivo',sans-serif; font-weight:700; font-size:1.4rem; margin-bottom:8px; }
.gate p { color: var(--mist); margin-bottom: 20px; }
.field {
  width: 100%;
  background: var(--ink);
  border: 1.5px solid var(--ink-3);
  border-radius: 12px;
  padding: 15px 16px;
  color: var(--bone);
  font-size: 1rem;
  font-family: inherit;
  margin-bottom: 12px;
}
.field:focus { outline: none; border-color: var(--amber); }
.field::placeholder { color: #5c7581; }
.gate-fine { font-size: 0.8rem; color: #5c7581; margin-top: 14px; }

/* ---- Report ------------------------------------------------------------- */
.report-body { }
.report-body h2, .report-body strong {
  font-family: 'Archivo', sans-serif;
}
.report-section { margin-bottom: 22px; }
.report-section .rs-head {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  color: var(--amber);
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.report-section p { color: var(--bone); }

/* Gap cards */
.gap-list { display: flex; flex-direction: column; gap: 14px; margin: 20px 0; }
.gap-card {
  background: var(--ink);
  border: 1px solid var(--ink-3);
  border-left: 4px solid var(--red);
  border-radius: 12px;
  padding: 18px;
}
.gap-card .gap-name {
  font-family: 'Archivo', sans-serif;
  font-weight: 700; font-size: 1.05rem; margin-bottom: 6px;
}
.gap-card .gap-problem { color: var(--bone); font-size: 0.96rem; margin-bottom: 8px; }
.gap-card .gap-hook { color: var(--mist); font-size: 0.9rem; font-style: italic; }

/* Coaching CTA */
.cta-block {
  background: linear-gradient(160deg, var(--ink-2), var(--ink));
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  margin: 28px 0 20px;
}
.cta-block h3 { font-family:'Archivo',sans-serif; font-weight:800; font-size:1.5rem; margin-bottom:10px; }
.cta-block p { color: var(--mist); margin-bottom: 20px; }

/* Share */
.share-block { text-align: center; margin-top: 26px; }
.share-block img {
  width: 100%; max-width: 340px; border-radius: 14px;
  border: 1px solid var(--ink-3); margin: 14px 0;
}

.center { text-align: center; }
.mt-16 { margin-top: 16px; }
.hidden { display: none !important; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
