/* ============================================================
   VP Sales Readiness & Commercial Scale Assessment
   Judah Growth Consulting
   --------------------------------------------------------------
   Theme is driven by CSS variables on :root. Adjust there to
   re-skin the tool. The aesthetic targets a premium consulting
   feel: warm neutral background, deep charcoal text, muted
   accents, generous whitespace, calm typography.
============================================================ */

:root {
  /* Palette — mirrors judahgrowth.com/diagnostic */
  --bg: #fbf8f0;            /* pale cream page */
  --surface: #ffffff;       /* cards, form fields */
  --surface-alt: #f1ead7;   /* recessed sections, progress track */
  --text: #0e1a2e;          /* deep navy */
  --muted: #5d5e6a;         /* secondary text */
  --border: #ece3cd;        /* warm hairline */
  --accent: #0e1a2e;        /* deep navy — primary action, ring fill */
  --accent-2: #a4823e;      /* warm bronze gold — eyebrows, asterisks */
  --success: #2f6b4a;
  --warning: #b8761a;
  --danger: #9a3b2a;

  /* Form */
  --field-bg: #ffffff;
  --field-border: #d8d1bd;
  --field-focus: #0e1a2e;

  /* Shape */
  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 1px 2px rgba(28, 28, 28, 0.04), 0 8px 24px -16px rgba(28, 28, 28, 0.18);
  --shadow-lg: 0 1px 2px rgba(28, 28, 28, 0.06), 0 16px 48px -20px rgba(28, 28, 28, 0.22);

  /* Type */
  --font-serif: "Cormorant Garamond", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", "Helvetica Neue", Arial, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Rhythm */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.print-only { display: none; }

/* `hidden` attribute must always win, even against display:flex/grid screens. */
[hidden] { display: none !important; }

/* Layout containers */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}
.container--narrow { max-width: 760px; }

/* Typography */
.display {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-5);
  color: var(--text);
}
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 500; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.2; margin: 0 0 var(--space-4); }
h3 { font-size: 1.25rem; line-height: 1.3; margin: 0 0 var(--space-3); }
p { margin: 0 0 var(--space-4); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 var(--space-4);
  font-weight: 500;
}
.lede {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  line-height: 1.45;
  color: var(--text);
  margin: 0 0 var(--space-5);
  font-weight: 400;
}
.body { font-size: 1rem; color: var(--text); }
.muted-note {
  color: var(--muted);
  font-size: 0.875rem;
  margin: var(--space-3) 0 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, transform 80ms ease;
  text-decoration: none;
  min-height: 44px;
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn--primary {
  background: var(--accent);
  color: #f9f6ef;
  border-color: var(--accent);
}
.btn--primary:hover { background: #14302a; border-color: #14302a; }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover { background: var(--surface-alt); border-color: var(--muted); }
.btn--link {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 12px 8px;
  min-height: 0;
}
.btn--link:hover { color: var(--text); }
.btn--lg { padding: 16px 28px; font-size: 1rem; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ============================================================
   PASSWORD GATE
============================================================ */
.screen { padding: var(--space-8) 0; }
.screen--gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6) var(--space-5);
}
.gate-card {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-7) var(--space-6);
  box-shadow: var(--shadow);
}
.gate-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  line-height: 1.2;
  margin: 0 0 var(--space-3);
}
.gate-sub { color: var(--muted); margin-bottom: var(--space-5); font-size: 0.95rem; }
.gate-form { display: flex; flex-direction: column; gap: var(--space-3); }

/* ============================================================
   MASTHEAD — centered logo with back-link top-right
============================================================ */
.masthead {
  position: relative;
  background: var(--bg);
  padding: var(--space-6) var(--space-5) var(--space-4);
  border-bottom: 1px solid var(--border);
}
.masthead-logo {
  display: flex;
  justify-content: center;
}
.masthead-logo img {
  height: 110px;
  width: auto;
  display: block;
  /* Logo PNG has white background — blend it into the cream page */
  mix-blend-mode: multiply;
}
.back-link {
  position: absolute;
  top: var(--space-6);
  right: var(--space-5);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.back-link:hover { color: var(--accent); text-decoration: none; }
.back-link-arrow { font-size: 1.05em; }
.masthead-step {
  position: absolute;
  top: calc(var(--space-6) + 22px);
  right: var(--space-5);
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}
@media (max-width: 720px) {
  .masthead { padding: var(--space-5) var(--space-4) var(--space-3); }
  .masthead-logo img { height: 84px; }
  .back-link {
    position: static;
    display: block;
    margin-bottom: var(--space-3);
  }
  .masthead-step {
    position: static;
    margin-top: var(--space-2);
    text-align: center;
  }
}

/* ============================================================
   LANDING
============================================================ */
.screen--landing { padding: var(--space-9) 0 var(--space-8); }
.landing-cta { margin: var(--space-6) 0 var(--space-7); }
.landing-meta {
  margin-top: var(--space-7);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}
.meta-item { font-size: 0.95rem; }
.meta-label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: var(--space-2);
  font-weight: 500;
}
.meta-value { color: var(--text); line-height: 1.55; }

/* ============================================================
   FORM
============================================================ */
.screen--form { padding: var(--space-7) 0 var(--space-8); }
.form-header { margin-bottom: var(--space-6); }
.progress { margin-top: var(--space-4); }
.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 500;
}
.progress-percent { font-variant-numeric: tabular-nums; }
.progress-track {
  background: var(--surface-alt);
  border-radius: 999px;
  height: 4px;
  overflow: hidden;
}
.progress-fill {
  background: var(--accent-2);
  height: 100%;
  width: 0;
  transition: width 240ms ease;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-7) var(--space-6);
  box-shadow: var(--shadow);
}
.step-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  line-height: 1.2;
  margin: 0 0 var(--space-3);
}
.step-intro {
  color: var(--muted);
  font-size: 1rem;
  margin: 0 0 var(--space-6);
  max-width: 60ch;
}

.field { margin-bottom: var(--space-5); }
.field:last-child { margin-bottom: 0; }
.field-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: var(--space-2);
  color: var(--text);
}
.field-required { color: var(--danger); margin-left: 2px; }
.field-help {
  font-size: 0.85rem;
  color: var(--muted);
  margin: var(--space-2) 0 0;
}

.field-input,
.field-select,
.field-textarea {
  width: 100%;
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 1rem;
  color: var(--text);
  transition: border-color 120ms ease, box-shadow 120ms ease;
  min-height: 44px;
}
.field-textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.field-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%236a655c' stroke-width='1.5' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  outline: none;
  border-color: var(--field-focus);
  box-shadow: 0 0 0 3px rgba(26, 58, 50, 0.12);
}
.field--invalid .field-input,
.field--invalid .field-select,
.field--invalid .field-textarea {
  border-color: var(--danger);
}
.form-error {
  color: var(--danger);
  font-size: 0.875rem;
  margin: var(--space-2) 0 0;
  min-height: 1.2em;
}

/* Slider */
.slider-wrap { padding-top: var(--space-2); }
.slider-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.slider-input {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--surface-alt);
  border-radius: 999px;
  outline: none;
}
.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--surface);
  box-shadow: 0 1px 4px rgba(28, 28, 28, 0.2);
}
.slider-input::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--surface);
}
.slider-value {
  min-width: 64px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
  font-weight: 500;
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 6px 10px;
}
.slider-bounds {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: var(--space-2);
}

.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

/* Two-column field grid for compact sections */
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}
.field-grid .field { margin-bottom: 0; }
.field-grid .field--full { grid-column: 1 / -1; }

@media (max-width: 640px) {
  .field-grid { grid-template-columns: 1fr; }
  .landing-meta { grid-template-columns: 1fr; gap: var(--space-5); }
  .step { padding: var(--space-6) var(--space-4); }
  .form-nav { flex-direction: column-reverse; }
  .form-nav .btn { width: 100%; }
  .results-actions .btn { width: 100%; }
}

/* ============================================================
   RESULTS
============================================================ */
.screen--results { padding: var(--space-7) 0 var(--space-8); }

.report-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-7) var(--space-6);
  box-shadow: var(--shadow-lg);
  margin-bottom: var(--space-6);
}
.report-hero-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: var(--space-7);
  align-items: center;
}
@media (max-width: 720px) {
  .report-hero-grid { grid-template-columns: 1fr; gap: var(--space-5); }
}

/* Score ring */
.score-ring-wrap { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.score-ring {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background:
    conic-gradient(var(--accent) calc(var(--score, 0) * 1%), var(--surface-alt) 0);
}
.score-ring::after {
  content: "";
  position: absolute;
  inset: 14px;
  background: var(--surface);
  border-radius: 50%;
}
.score-ring-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}
.score-ring-num {
  font-family: var(--font-serif);
  font-size: 3.6rem;
  line-height: 1;
  font-weight: 500;
}
.score-ring-label {
  display: block;
  margin-top: var(--space-2);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.score-band {
  font-size: 0.85rem;
  color: var(--muted);
}

.report-hero-meta { display: grid; gap: var(--space-3); }
.hero-row { display: flex; flex-wrap: wrap; gap: var(--space-5); }
.hero-row .meta-item { min-width: 200px; }
.hero-verdict-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--space-2);
}
.hero-verdict {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  line-height: 1.18;
  margin: 0 0 var(--space-3);
}
.hero-recommend { color: var(--text); margin: 0; }
.hero-recommend strong { font-weight: 600; }

.report-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow);
  margin-bottom: var(--space-5);
}
.section-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin: 0 0 var(--space-4);
}

.scorecard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
}
.score-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.score-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
}
.score-card-name {
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0;
  color: var(--text);
}
.score-card-num {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  line-height: 1;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.score-card-bar {
  background: var(--surface-alt);
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  margin-top: var(--space-2);
}
.score-card-bar-fill { height: 100%; background: var(--accent); border-radius: 999px; }
.score-card-band {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: var(--space-2);
}
.band--strong { color: var(--success); }
.band--adequate { color: var(--accent-2); }
.band--weak { color: var(--warning); }
.band--critical { color: var(--danger); }
.score-card-interp {
  font-size: 0.92rem;
  color: var(--text);
  margin: var(--space-2) 0 0;
  line-height: 1.5;
}
.score-card-improve {
  font-size: 0.85rem;
  color: var(--muted);
  margin: var(--space-2) 0 0;
}
.score-card-improve strong { color: var(--text); font-weight: 500; }

.warnings-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-3);
}
.warning-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  background: #faf2e7;
  border-left: 3px solid var(--warning);
  border-radius: var(--radius);
}
.warning-item strong { display: block; margin-bottom: 2px; font-weight: 600; }
.warning-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--warning);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 2px;
}

.plan-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-5);
}
.plan-phase {
  border-left: 3px solid var(--accent);
  padding: 0 0 0 var(--space-4);
}
.plan-phase-title {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--space-3);
}
.plan-items {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text);
}
.plan-items li { margin-bottom: var(--space-2); }

.action-callout {
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: var(--space-5);
  margin: var(--space-4) 0 0;
}
.action-callout p { margin: 0; }
.action-callout strong { display: block; margin-bottom: var(--space-2); font-weight: 600; }

.interview-list {
  margin: 0;
  padding-left: 1.1rem;
}
.interview-list li { margin-bottom: var(--space-2); }

.cta-block {
  background: var(--accent);
  color: #f9f6ef;
  border-radius: var(--radius-lg);
  padding: var(--space-7) var(--space-6);
  margin-top: var(--space-5);
  text-align: center;
}
.cta-block h2 {
  font-family: var(--font-serif);
  color: #f9f6ef;
  margin: 0 0 var(--space-3);
}
.cta-block p { color: rgba(249, 246, 239, 0.86); max-width: 60ch; margin: 0 auto var(--space-5); }
.cta-block .btn {
  background: #f9f6ef;
  color: var(--accent);
  border-color: #f9f6ef;
  padding: 16px 32px;
  font-size: 1rem;
}
.cta-block .btn:hover { background: #fff; border-color: #fff; }

.exec-summary p {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.55;
  margin: 0 0 var(--space-3);
}

.results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: var(--space-6) 0 0;
  align-items: center;
}
.copy-toast {
  margin-top: var(--space-4);
  font-size: 0.85rem;
  color: var(--success);
  min-height: 1.2em;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: var(--space-8);
  padding: var(--space-6) 0;
  background: var(--bg);
}
.site-footer .muted-note { margin: 0; text-align: center; }

/* ============================================================
   PRINT STYLES
============================================================ */
@media print {
  @page { size: Letter; margin: 0.6in; }

  html, body { background: #fff; color: #000; font-size: 11pt; }
  body { font-family: Georgia, "Times New Roman", serif; }

  .no-print, #gate, header.masthead, .masthead, .results-actions,
  .form-nav, .progress, #copyToast, footer.site-footer { display: none !important; }

  #app { display: block !important; }
  #landing, #assessment { display: none !important; }
  #results { display: block !important; padding: 0 !important; }

  .container, .container--narrow { max-width: none; padding: 0; }

  .print-only { display: block; }
  .print-header {
    border-bottom: 1px solid #000;
    padding-bottom: 12pt;
    margin-bottom: 16pt;
  }
  .print-brand {
    margin: 0;
    font-family: Georgia, serif;
    font-size: 10pt;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }
  .print-doc-title {
    margin: 4pt 0 0;
    font-family: Georgia, serif;
    font-size: 16pt;
    font-weight: 500;
  }
  .print-date { margin: 4pt 0 0; font-size: 10pt; color: #444; }

  .report-hero, .report-section, .score-card, .cta-block, .warning-item, .action-callout {
    background: #fff !important;
    border: 1px solid #888;
    box-shadow: none !important;
    color: #000 !important;
    page-break-inside: avoid;
    break-inside: avoid;
    padding: 12pt;
    border-radius: 4px;
  }
  .report-hero { padding: 16pt; margin-bottom: 14pt; }
  .report-section { margin-bottom: 14pt; }

  .display, h1, h2, h3, .section-title, .step-title, .hero-verdict {
    font-family: Georgia, "Times New Roman", serif;
    color: #000;
  }

  .score-ring {
    width: 1.6in; height: 1.6in;
    background: #fff;
    border: 6px solid #000;
  }
  .score-ring::after { inset: 4px; }
  .score-ring-num { color: #000; }

  .score-card-bar, .progress-track { background: #ddd; }
  .score-card-bar-fill, .progress-fill { background: #000; }

  .cta-block { background: #fff !important; color: #000 !important; border: 2px solid #000; }
  .cta-block h2, .cta-block p { color: #000 !important; }

  .warning-item { background: #f5f5f5; border-left: 3px solid #000; }
  .warning-icon { background: #000; }

  .plan-phase { border-left-color: #000; }
  .plan-phase-title { color: #000; }

  .scorecard { grid-template-columns: 1fr 1fr; gap: 8pt; }

  a { color: #000; text-decoration: none; }
}
