/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root {
  --bg: #f4f1ec;
  --bg-accent: #e8e2d6;
  --surface: #ffffff;
  --ink: #1f2933;
  --ink-soft: #52606d;
  --ink-mute: #7b8794;
  --brand: #2e7d6b;
  --brand-dark: #1f5a4d;
  --brand-soft: #d6ebe4;
  --accent: #c08a3e;
  --warn: #b86a3a;
  --good: #2e7d6b;
  --danger: #b04545;
  --border: #d9d2c4;
  --shadow: 0 10px 30px -12px rgba(31, 41, 51, 0.18);
  --radius: 14px;
  --radius-sm: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg-accent) 100%);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Layout ---------- */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.screen { display: none; }
.screen.active { display: block; animation: fade 0.25s ease-out; }

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 36px 32px;
  box-shadow: var(--shadow);
}

/* ---------- Typography ---------- */
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

h1 {
  font-size: 32px;
  line-height: 1.2;
  margin: 0 0 14px;
  color: var(--ink);
}

h2 {
  font-size: 24px;
  line-height: 1.3;
  margin: 0 0 14px;
  color: var(--ink);
}

.lead {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0 0 24px;
}

.section-heading {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 32px 0 14px;
}

/* ---------- Start screen ---------- */
.hero-photo {
  /* Bleed to the edges of the .card (which has 36px padding) and round only the top corners. */
  margin: -36px -36px 28px;
  overflow: hidden;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  position: relative;
  /* Subtle gradient fade at the bottom of the photo so it blends into the white card. */
  background: var(--brand-soft);
}
.hero-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  /* Bias the crop upward — keeps faces in the visible area when going from 4:3 to 16:9. */
  object-position: center 32%;
}
.hero-photo::after {
  /* Soft white fade at the very bottom so the photo feels like part of the card. */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.55));
  pointer-events: none;
}

.dimension-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  border-top: 1px solid var(--border);
}
.dimension-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 15px;
}
.dimension-list strong { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  font: inherit;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 14px 28px; font-size: 16px; }

.btn-primary {
  /* Orange CTA — vivid pumpkin/autumn tone, passes WCAG AA on white. */
  background: #e0651d;
  color: #fff;
}
.btn-primary:hover { background: #b85016; }
.btn-primary:disabled {
  background: var(--ink-mute);
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-accent); }
.btn-ghost:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}
.actions-center { justify-content: center; }

/* ---------- Quiz: progress ---------- */
.progress {
  margin-bottom: 24px;
}
.progress-track {
  height: 6px;
  background: var(--bg-accent);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--brand);
  width: 0%;
  border-radius: 999px;
  transition: width 0.3s ease;
}
.progress-label {
  display: block;
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: 8px;
  font-weight: 500;
}

.quiz-question {
  font-size: 22px;
  margin: 8px 0 24px;
}

/* ---------- Quiz: options ---------- */
.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s;
  text-align: left;
}
.option:hover { border-color: var(--brand); }
.option.selected {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.option-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--ink-mute);
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.15s;
}
.option.selected .option-dot {
  border-color: var(--brand);
}
.option.selected .option-dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--brand);
}

/* ---------- Results ---------- */
.score-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 20px 0;
}
.score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  display: flex;
  align-items: baseline;
  justify-content: center;
  font-size: 38px;
  font-weight: 700;
  flex-shrink: 0;
  border: 3px solid var(--brand);
}
.score-circle.band-not-ready    { background: #f5dcdc; color: var(--danger); border-color: var(--danger); }
.score-circle.band-building     { background: #f7e5cf; color: var(--warn);   border-color: var(--warn); }
.score-circle.band-approaching  { background: var(--brand-soft); color: var(--brand-dark); border-color: var(--brand); }
.score-circle.band-ready        { background: var(--brand-soft); color: var(--brand-dark); border-color: var(--brand-dark); }
.score-suffix {
  font-size: 16px;
  font-weight: 500;
  opacity: 0.7;
  margin-left: 2px;
}
.score-text { flex: 1; }
.score-band {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-accent);
  color: var(--ink);
  margin-bottom: 8px;
}
.score-verdict {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.callouts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}
.callout {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border-left: 4px solid;
}
.callout-strength {
  background: var(--brand-soft);
  border-left-color: var(--brand);
}
.callout-gap {
  background: #f7e5cf;
  border-left-color: var(--warn);
}
.callout-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 4px;
}
.callout-dimension {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.dimension-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dim-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.dim-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}
.dim-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}
.dim-score {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-soft);
}
.dim-bar {
  height: 5px;
  background: var(--bg-accent);
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0 10px;
}
.dim-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--brand);
}
.dim-bar-fill.band-not-ready   { background: var(--danger); }
.dim-bar-fill.band-building    { background: var(--warn); }
.dim-bar-fill.band-approaching { background: var(--brand); }
.dim-bar-fill.band-ready       { background: var(--brand-dark); }
.dim-text {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ---------- Social footer ---------- */
.social-footer {
  text-align: center;
  padding: 32px 16px 8px;
}
.social-label {
  font-size: 13px;
  color: var(--ink-mute);
  margin: 0 0 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.social-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.social-link:hover {
  background: var(--brand);
  color: #fff;
  transform: translateY(-2px);
}
.social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .container { padding: 20px 14px 32px; }
  .card { padding: 24px 20px; }
  /* Match the smaller card padding so the photo still bleeds edge-to-edge. */
  .hero-photo { margin: -24px -20px 20px; }
  h1 { font-size: 26px; }
  h2 { font-size: 20px; }
  .quiz-question { font-size: 19px; }
  .score-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
  .score-circle { width: 100px; height: 100px; font-size: 32px; }
  .callouts { grid-template-columns: 1fr; }
  .actions { flex-direction: column-reverse; }
  .actions .btn { width: 100%; }
}
