/* =========================================================
   RECHARGE YOUR LIFE · CORE VALUES ASSESSMENT
   Brand: Deep Forest #2D4A22 · Sage Green #5B7B3A ·
          Golden Acorn #C9A961 · Warm Cream #F5F1E8 ·
          Rooted Brown #3A3328 · Ivory White #FAF8F2 ·
          Sandstone #E8DCC5 · Calm Teal #7BA098
   Fonts: Zodiak (display) · Work Sans (body) · Caveat (script)
   ========================================================= */

:root {
  /* Brand palette */
  --deep-forest: #2D4A22;
  --deep-forest-hover: #1F3517;
  --sage-green: #5B7B3A;
  --golden-acorn: #C9A961;
  --golden-acorn-hover: #B08F45;
  --warm-cream: #F5F1E8;
  --calm-teal: #7BA098;
  --rooted-brown: #3A3328;
  --ivory-white: #FAF8F2;
  --sandstone: #E8DCC5;

  /* Semantic tokens */
  --bg: var(--warm-cream);
  --surface: var(--ivory-white);
  --surface-offset: var(--sandstone);
  --text: var(--rooted-brown);
  --text-muted: #6B5F4E;
  --text-faint: #9A8D78;
  --border: #D8CFB8;
  --border-strong: #B8AA8A;
  --primary: var(--deep-forest);
  --primary-hover: var(--deep-forest-hover);
  --accent: var(--golden-acorn);

  /* Type */
  --font-display: "Zodiak", "Cormorant Garamond", Georgia, serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-script: "Caveat", "Brush Script MT", cursive;

  /* Radius & shadow */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(58, 51, 40, 0.05);
  --shadow: 0 4px 16px rgba(45, 74, 34, 0.08);
  --shadow-lg: 0 12px 40px rgba(45, 74, 34, 0.12);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* Subtle organic background texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(91, 123, 58, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(201, 169, 97, 0.05) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 24px 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--deep-forest);
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  color: var(--deep-forest);
  flex-shrink: 0;
}

.brand-lockup { display: flex; flex-direction: column; line-height: 1.15; }

.brand-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--deep-forest);
}

.brand-tagline {
  font-family: var(--font-display);
  font-size: 13px;
  font-style: italic;
  color: var(--golden-acorn);
  margin-top: 2px;
}

.progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
  align-items: flex-end;
}

.progress-track {
  width: 220px;
  height: 4px;
  background: var(--sandstone);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--deep-forest);
  border-radius: 999px;
  transition: width 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

/* =========================================================
   SCREENS
   ========================================================= */
.screen { display: none; animation: fadeIn 400ms ease; }
.screen.active { display: block; }

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

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-green);
  margin-bottom: 20px;
}

h1.hero-title,
h1.results-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(38px, 5.5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--deep-forest);
  margin: 0 0 20px;
}

h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 3.5vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--deep-forest);
  margin: 0 0 16px;
}

h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  color: var(--deep-forest);
  margin: 0 0 8px;
}

p { margin: 0 0 16px; }

strong { font-weight: 600; color: var(--rooted-brown); }

.script-sig {
  font-family: var(--font-script);
  color: var(--golden-acorn);
  font-size: 1.35em;
  font-weight: 600;
}

/* =========================================================
   WELCOME SCREEN
   ========================================================= */
.welcome-inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  padding: 20px 0 40px;
}

.hero-sub {
  font-size: 19px;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 640px;
  margin: 0 auto 32px;
}

.prework-callout {
  max-width: 620px;
  margin: 0 auto 48px;
  padding: 22px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--golden-acorn);
  border-radius: var(--radius);
  text-align: left;
}
.prework-callout p {
  margin: 0;
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.55;
}
.prework-callout strong { color: var(--deep-forest); font-weight: 600; }

.how-it-works {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0 auto 48px;
  text-align: left;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.step-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.step-num {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--golden-acorn);
  font-weight: 500;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.step-card h3 { font-size: 18px; margin-bottom: 6px; }

.step-card p {
  font-size: 14.5px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.name-input-group {
  max-width: 420px;
  margin: 0 auto 24px;
  text-align: left;
}

.name-input-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.name-input-group input {
  width: 100%;
  padding: 14px 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--text);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.name-input-group input:focus {
  outline: none;
  border-color: var(--sage-green);
  box-shadow: 0 0 0 4px rgba(91, 123, 58, 0.12);
}

.signature {
  margin-top: 28px;
  color: var(--text-muted);
  font-size: 15px;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 200ms ease;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--deep-forest);
  color: var(--warm-cream);
  border-color: var(--deep-forest);
}
.btn-primary:hover:not(:disabled) {
  background: var(--deep-forest-hover);
  border-color: var(--deep-forest-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn-primary:disabled {
  background: var(--sandstone);
  color: var(--text-faint);
  border-color: var(--sandstone);
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--golden-acorn);
  color: var(--rooted-brown);
  border-color: var(--golden-acorn);
}
.btn-secondary:hover {
  background: var(--golden-acorn-hover);
  border-color: var(--golden-acorn-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-ghost {
  background: transparent;
  color: var(--deep-forest);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background: var(--surface);
  border-color: var(--deep-forest);
}

.btn-lg {
  padding: 17px 36px;
  font-size: 16px;
}

/* =========================================================
   STAGE HEADERS
   ========================================================= */
.stage-header {
  max-width: 720px;
  margin: 0 auto 40px;
  text-align: center;
}

.stage-sub {
  font-size: 17px;
  color: var(--text-muted);
  margin: 0 auto 24px;
  max-width: 620px;
}

.selection-counter {
  display: inline-block;
  padding: 8px 18px;
  background: var(--deep-forest);
  color: var(--warm-cream);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.selection-counter.warning {
  background: var(--golden-acorn);
  color: var(--rooted-brown);
}

/* =========================================================
   VALUES GRID (Select + Narrow)
   ========================================================= */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 40px;
}

.value-chip {
  padding: 14px 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: all 180ms ease;
  user-select: none;
  position: relative;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.value-chip:hover:not(.disabled) {
  border-color: var(--sage-green);
  background: #FDFBF3;
  transform: translateY(-1px);
}

.value-chip.selected {
  background: var(--deep-forest);
  color: var(--warm-cream);
  border-color: var(--deep-forest);
}

.value-chip.selected::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--golden-acorn);
  border-radius: 50%;
}

.value-chip.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* =========================================================
   RANK LIST (drag & drop)
   ========================================================= */
.rank-list {
  list-style: none;
  padding: 0;
  margin: 0 auto 40px;
  max-width: 640px;
  counter-reset: rank;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: grab;
  transition: all 180ms ease;
  position: relative;
}

.rank-item:hover {
  border-color: var(--sage-green);
  box-shadow: var(--shadow-sm);
}

.rank-item.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.rank-item.drag-over {
  border-color: var(--deep-forest);
  border-style: dashed;
}

.rank-item.top-five {
  background: linear-gradient(90deg, rgba(201, 169, 97, 0.08) 0%, transparent 100%);
  border-color: var(--golden-acorn);
}

.rank-number {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--golden-acorn);
  min-width: 36px;
  text-align: center;
  line-height: 1;
}

.rank-item.top-five .rank-number { color: var(--deep-forest); }

.rank-name {
  flex: 1;
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
}

.rank-controls {
  display: flex;
  gap: 4px;
}

.rank-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 150ms ease;
}
.rank-btn:hover:not(:disabled) {
  border-color: var(--deep-forest);
  color: var(--deep-forest);
  background: var(--warm-cream);
}
.rank-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.rank-handle {
  color: var(--text-faint);
  cursor: grab;
  line-height: 1;
  font-size: 18px;
}

.rank-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 12px;
  padding: 0 4px;
}
.rank-divider::before,
.rank-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.rank-divider span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* =========================================================
   STAGE ACTIONS
   ========================================================= */
.stage-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* =========================================================
   RESULTS
   ========================================================= */
.results-inner {
  max-width: 760px;
  margin: 0 auto;
}

.results-date {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 48px;
}

.results-block {
  margin-bottom: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}

.results-block-header { margin-bottom: 24px; }
.results-block-header h2 { font-size: 26px; margin-bottom: 6px; }

.results-note {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0;
}

.results-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: item;
}

.results-list li {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  counter-increment: item;
}
.results-list li:last-child { border-bottom: none; }

.results-list-primary li::before {
  content: counter(item);
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 500;
  color: var(--golden-acorn);
  min-width: 48px;
  line-height: 1;
}

.results-list-secondary { counter-reset: item 5; }
.results-list-secondary li::before {
  content: counter(item);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  color: var(--sage-green);
  min-width: 40px;
  line-height: 1;
}

.result-value-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--deep-forest);
}

.results-list-secondary .result-value-name { font-size: 20px; }

.reflection-box {
  background: var(--deep-forest);
  color: var(--warm-cream);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 40px;
}
.reflection-box h3 {
  color: var(--golden-acorn);
  margin-bottom: 16px;
  font-size: 22px;
}
.reflection-box p {
  color: rgba(245, 241, 232, 0.92);
  font-size: 16.5px;
  line-height: 1.65;
}
.reflection-box .script-sig {
  color: var(--golden-acorn);
  font-size: 28px;
  display: block;
  margin-top: 8px;
}

.results-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 48px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.next-step-cta {
  text-align: center;
  padding: 32px 24px;
}
.next-step-cta h3 { font-size: 24px; margin-bottom: 10px; }
.next-step-cta p {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 24px;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  margin-top: auto;
  padding-top: 48px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}
.site-footer a { color: var(--sage-green); text-decoration: none; }
.site-footer a:hover { color: var(--deep-forest); text-decoration: underline; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .how-it-works { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .app { padding: 16px 16px 60px; }
  .site-header { padding-bottom: 20px; margin-bottom: 32px; }
  .progress-wrap { align-items: flex-start; width: 100%; }
  .progress-track { width: 100%; }
  .brand-tagline { display: none; }
  .brand-name { font-size: 18px; }
  .how-it-works { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .value-chip { font-size: 14px; padding: 12px 10px; min-height: 48px; }
  .results-block { padding: 24px 20px; }
  .reflection-box { padding: 28px 22px; }
  .results-list-primary li::before { font-size: 32px; min-width: 40px; }
  .stage-actions { flex-direction: column-reverse; }
  .stage-actions .btn { width: 100%; }
  .rank-item { padding: 14px 14px; gap: 10px; }
  .rank-handle { display: none; }
}
