/* AI Leverage Compass — BrittAI brand styles. Tokens from planning/design-system.md.
   Light canvas, blue = drive, green = single accent, wolf-grey neutrals. */

:root {
  /* Brand & primary */
  --navy-900: #0A1628; --navy-950: #050B16; --navy-800: #0F1F38;
  --navy-700: #16294A; --navy-600: #1E3A66;
  --blue-50: #EEF3FF; --blue-100: #DCE7FF; --blue-300: #97B6FF;
  --blue-400: #5B8DFF; --blue-500: #2C6BFF; --blue-600: #1356E8; --blue-700: #0B43C9;
  --green-50: #ECFDF3; --green-300: #8CEEB0; --green-400: #57E08A;
  --green-500: #2FD171; --green-600: #1FC267; --green-700: #16A34A;
  --grey-50: #F8FAFB; --grey-100: #F1F3F6; --grey-150: #E8EBEF; --grey-200: #DDE2E8;
  --grey-300: #BFC7D1; --grey-400: #939DAA; --grey-500: #6B7684; --grey-600: #4E5864;
  --white: #FFFFFF;
  --grad-brand: linear-gradient(115deg, var(--blue-500) 0%, var(--green-500) 100%);

  /* Light semantic tokens (white canvas) */
  --bg: var(--white);
  --bg-subtle: var(--grey-50);
  --surface: var(--white);
  --surface-raised: var(--white);
  --fg: var(--navy-900);
  --fg-secondary: var(--grey-600);
  --fg-muted: var(--grey-500);
  --border: var(--grey-200);
  --border-strong: var(--grey-300);
  --primary: var(--blue-500);
  --accent: var(--green-500);

  /* Type */
  --font-display: 'Instrument Sans', system-ui, sans-serif;
  --font-sans: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  /* Spacing (4px grid) */
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem;
  --space-5: 1.5rem; --space-6: 2rem; --space-7: 3rem; --space-8: 4rem; --space-9: 6rem;

  /* Radii */
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 24px; --radius-pill: 999px;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(10,22,40,.06);
  --shadow-sm: 0 1px 3px rgba(10,22,40,.08), 0 1px 2px rgba(10,22,40,.04);
  --shadow-md: 0 4px 12px rgba(10,22,40,.08), 0 2px 4px rgba(10,22,40,.05);
  --shadow-lg: 0 12px 28px rgba(10,22,40,.12), 0 4px 10px rgba(10,22,40,.06);
  --shadow-glow-blue: 0 0 0 1px rgba(44,107,255,.30), 0 8px 30px rgba(44,107,255,.28);

  /* Motion */
  --dur-fast: 120ms; --dur-base: 220ms; --dur-slow: 420ms;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Subtle light gradient canvas */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 600px at 80% -10%, rgba(44,107,255,.06), transparent 60%),
    radial-gradient(700px 500px at 0% 110%, rgba(47,209,113,.05), transparent 55%),
    var(--grey-50);
}

#app {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4) var(--space-9);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.screen { animation: fade-up var(--dur-slow) var(--ease-out); }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Header / progress */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); margin-bottom: var(--space-6);
}
.wordmark {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.015em;
  font-size: 1.0625rem; color: var(--fg);
}
.wordmark .ai {
  background: var(--grad-brand); -webkit-background-clip: text;
  background-clip: text; color: transparent;
}
.progress-wrap {
  flex: 1; max-width: 280px;
  display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2);
}
.progress {
  width: 100%; height: 6px; border-radius: var(--radius-pill);
  background: var(--grey-150); overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: var(--radius-pill);
  background: var(--grad-brand); transition: width var(--dur-base) var(--ease-out);
}
.progress-meta {
  font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .03em;
  color: var(--fg-muted); white-space: nowrap;
}

/* Typography */
.eyebrow {
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: var(--blue-600); margin-bottom: var(--space-3);
}
h1.display {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.75rem); line-height: 1.04;
  letter-spacing: -.02em; margin-bottom: var(--space-4);
}
h2.question {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.375rem, 1.05rem + 1.2vw, 1.875rem); line-height: 1.15;
  letter-spacing: -.015em; margin-bottom: var(--space-5);
}
.lead { font-size: 1.125rem; color: var(--fg-secondary); margin-bottom: var(--space-6); }
.hint { font-size: .875rem; color: var(--fg-muted); margin-bottom: var(--space-5); }
.step-meta { font-size: .75rem; color: var(--fg-muted); margin-bottom: var(--space-3);
  font-family: var(--font-mono); letter-spacing: .04em; }

/* Option cards */
.options { display: flex; flex-direction: column; gap: var(--space-3); }
.option {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-md); color: var(--fg);
  font-size: 1rem; text-align: left; cursor: pointer; width: 100%;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.option:hover { border-color: var(--blue-400); background: var(--bg-subtle); box-shadow: var(--shadow-sm); }
.option:active { transform: scale(.99); }
.option .marker {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px;
  border: 1.5px solid var(--border-strong); display: grid; place-items: center;
  transition: all var(--dur-fast) var(--ease-out);
}
.option.multi .marker { border-radius: 6px; }
.option:not(.multi) .marker { border-radius: 999px; }
.option.selected { border-color: var(--blue-500); background: rgba(44,107,255,.10); }
.option.selected .marker { background: var(--blue-500); border-color: var(--blue-500); }
.option.selected .marker::after {
  content: ''; width: 9px; height: 9px; border-radius: 2px; background: var(--white);
}
.option:not(.multi).selected .marker::after { border-radius: 999px; }

/* Buttons */
.actions { display: flex; gap: var(--space-3); margin-top: var(--space-6); align-items: center; }
.btn {
  font-family: var(--font-sans); font-weight: 600; font-size: 1rem;
  padding: var(--space-3) var(--space-6); border-radius: var(--radius-md);
  border: 1.5px solid transparent; cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--blue-600); }
.btn-primary:active { transform: scale(.98); }
.btn-glow { box-shadow: var(--shadow-glow-blue); }
.btn-ghost { background: transparent; color: var(--fg-secondary); border-color: var(--border-strong); }
.btn-ghost:hover { color: var(--fg); border-color: var(--blue-400); }
.btn-accent { background: var(--accent); color: var(--navy-900); }
.btn-accent:hover { background: var(--green-600); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.spacer { flex: 1; }

/* ---- Results ---- */
.score-hero {
  text-align: center; padding: var(--space-7) var(--space-5);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); margin-bottom: var(--space-5);
  box-shadow: var(--shadow-md);
}
.score-number {
  font-family: var(--font-mono); font-weight: 700;
  font-size: clamp(3.5rem, 2rem + 8vw, 6rem); line-height: 1;
  background: var(--grad-brand); -webkit-background-clip: text;
  background-clip: text; color: transparent;
}
.score-outof { font-family: var(--font-mono); color: var(--fg-muted); font-size: 1.25rem; }
.band-name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.75rem;
  margin-top: var(--space-3);
}
.band-blurb { color: var(--fg-secondary); max-width: 46ch; margin: var(--space-2) auto 0; }

.section-title {
  font-family: var(--font-display); font-weight: 600; font-size: 1.25rem;
  margin: var(--space-6) 0 var(--space-4);
}

/* Lever / gap metric bars */
.metric-row { margin-bottom: var(--space-4); }
.metric-head { display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: var(--space-2); }
.metric-label { font-weight: 600; }
.metric-tag { font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; padding: 2px 8px; border-radius: var(--radius-pill); }
.metric-tag.lever { color: var(--green-700); background: rgba(47,209,113,.14); }
.metric-tag.gap { color: var(--blue-700); background: rgba(44,107,255,.12); }
.metric-val { font-family: var(--font-mono); color: var(--fg-secondary); font-size: .875rem; }
.bar { height: 10px; border-radius: var(--radius-pill); background: var(--grey-150); overflow: hidden; }
.bar-fill { height: 100%; border-radius: var(--radius-pill); transition: width var(--dur-slow) var(--ease-out); }
.bar-fill.lever { background: var(--accent); }
.bar-fill.gap { background: var(--primary); }
.bar-fill.neutral { background: var(--blue-400); opacity: .65; }
.metric-measure { font-size: .8125rem; color: var(--fg-muted); margin-top: var(--space-2); }

/* Grouped "Where you stand" breakdown */
.stand-summary { color: var(--fg-secondary); margin-bottom: var(--space-5); }
.metric-group {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-5);
  margin-bottom: var(--space-4); box-shadow: var(--shadow-sm);
}
.group-head { margin-bottom: var(--space-4); }
.group-label {
  font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem;
  display: flex; align-items: center; gap: var(--space-2);
}
.group-blurb { font-size: .8125rem; color: var(--fg-muted); }
.metric-group .metric-row:last-child { margin-bottom: 0; }

/* Side cue: thin left accent + a small dot. Keeps green scarce (one dot, not a wash). */
.group-dot { width: 8px; height: 8px; border-radius: var(--radius-pill); flex: 0 0 auto; }
.metric-group--prize { border-left: 3px solid var(--accent); }
.metric-group--prize .group-dot { background: var(--accent); }
.metric-group--capture { border-left: 3px solid var(--primary); }
.metric-group--capture .group-dot { background: var(--primary); }

/* Dollar cards */
.dollar-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-3); }
@media (min-width: 600px) { .dollar-grid { grid-template-columns: repeat(3, 1fr); } }
.dollar-grid.cols-4 { grid-template-columns: 1fr; }
@media (min-width: 520px) { .dollar-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .dollar-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }
.dollar-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.dollar-card .label { font-size: .8125rem; color: var(--fg-muted); margin-bottom: var(--space-2); }
.dollar-card .value {
  font-family: var(--font-mono); font-weight: 700; font-size: 1.75rem; color: var(--fg);
}
.dollar-card .sub { font-size: .8125rem; color: var(--fg-muted); margin-top: var(--space-2); }
.dollar-card.highlight { border-color: var(--green-600); }
.dollar-card.highlight .value { color: var(--green-700); }
/* Hero: the one number to anchor on, rendered large above the supporting four. */
.dollar-hero { margin-bottom: var(--space-3); }
.dollar-hero .value { font-size: 2.75rem; }
.dollar-note { font-size: .8125rem; color: var(--fg-muted); margin-top: var(--space-3); }

/* Next-steps map */
.steps { display: flex; flex-direction: column; gap: var(--space-3); }
.step {
  display: flex; gap: var(--space-4); align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: var(--space-4) var(--space-5);
  box-shadow: var(--shadow-sm);
}
.step-num {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: var(--radius-pill);
  background: var(--grad-brand); color: var(--white); font-family: var(--font-mono);
  font-weight: 700; font-size: .875rem; display: grid; place-items: center;
}
.step-body { flex: 1; }
.step-text { color: var(--fg); }
.step-badge {
  display: inline-block; margin-top: var(--space-2); font-size: .6875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--blue-700);
  background: rgba(44,107,255,.10); padding: 2px 8px; border-radius: var(--radius-pill);
}

/* CTA */
.cta {
  margin-top: var(--space-7); padding: var(--space-6);
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: var(--radius-xl); text-align: center; box-shadow: var(--shadow-sm);
}
.cta-bridge { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem;
  margin-bottom: var(--space-4); }

/* Landing: reassurance line + how-it-works */
.reassure {
  font-family: var(--font-mono); font-size: .75rem; letter-spacing: .03em;
  color: var(--fg-muted); margin-top: var(--space-4);
}
.how { margin-top: var(--space-8); }
.how .step { cursor: default; }

/* Results email gate */
.gate {
  position: relative; margin-top: var(--space-3);
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  background: var(--bg-subtle); overflow: hidden; box-shadow: var(--shadow-sm);
}
/* Blurred teaser of the dollar cards behind the form. */
.gate-preview { position: relative; padding: var(--space-5) var(--space-5) 0; }
.gate-preview .dollar-grid { filter: blur(7px); opacity: .55; pointer-events: none; user-select: none; }
.gate-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(248,250,251,0) 0%, var(--bg-subtle) 92%);
}
.gate-form {
  position: relative; padding: var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-4);
}
.gate-copy { display: flex; flex-direction: column; gap: var(--space-2); }
.gate-copy strong { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; }
.gate-copy span { color: var(--fg-secondary); font-size: .9375rem; }
.gate-row { display: flex; flex-direction: column; gap: var(--space-3); }
@media (min-width: 540px) { .gate-row { flex-direction: row; } .gate-row .btn { white-space: nowrap; } }
.gate-input {
  flex: 1; font-family: var(--font-sans); font-size: 1rem; color: var(--fg);
  padding: var(--space-3) var(--space-4); background: var(--grey-50);
  border: 1.5px solid var(--border-strong); border-radius: var(--radius-md);
}
.gate-input::placeholder { color: var(--fg-muted); }
.gate-input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(44,107,255,.30); }
.gate-error { color: var(--blue-700); font-size: .8125rem; }
.gate-fine { color: var(--fg-muted); font-size: .75rem; }
/* Honeypot: kept in the DOM for bots, hidden from people and assistive tech. */
.gate-hp, .req-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Homepage access-request form (name / company / email) */
.req-form { position: relative; margin-top: var(--space-6); display: flex; flex-direction: column; }
.req-fields { display: flex; flex-direction: column; gap: var(--space-3); }
.req-fields .gate-input { width: 100%; }
@media (min-width: 640px) {
  .req-fields { flex-direction: row; }
  .req-fields .gate-input:first-child { flex: 1.2; }
}
.req-form .gate-error { margin-top: var(--space-3); }

@media (prefers-reduced-motion: reduce) {
  *, .screen, .bar-fill, .progress-fill { animation: none !important; transition: none !important; }
}
