/* ==========================================================================
   JobPilot — instrument panel design system
   Dark cockpit aesthetic: near-black ground, amber warnings, cyan readouts.
   Single stylesheet, no build step, no external fonts (Cloudflare-friendly).
   ========================================================================== */

:root {
  /* Ground */
  --bg:            #0a0c10;
  --bg-panel:      #11151c;
  --bg-panel-2:    #161b24;
  --bg-inset:      #070910;

  /* Strokes */
  --line:          #232a36;
  --line-bright:   #313b4b;

  /* Ink */
  --ink:           #e7ecf3;
  --ink-dim:       #9aa7b8;
  --ink-faint:     #64707f;

  /* Instrument colors */
  --cyan:          #4dd4e0;
  --cyan-dim:      #2a8f99;
  --amber:         #f0a828;
  --amber-dim:     #9c6d18;
  --red:           #ef5a5a;
  --green:         #4ade80;

  /* Type */
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Consolas", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Metrics */
  --wrap: 1120px;
  --radius: 4px;
  --radius-lg: 8px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Faint instrument grid over the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: .28;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
.wrap--narrow { max-width: 760px; }

/* --------------------------------------------------------------- typography */

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; font-weight: 650; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.125rem); }
h3 { font-size: 1.1875rem; }
p  { margin: 0 0 1.15em; }
a  { color: var(--cyan); text-decoration-color: var(--cyan-dim); text-underline-offset: 3px; }
a:hover { color: #7fe6ef; }

.lede { font-size: 1.1875rem; color: var(--ink-dim); max-width: 62ch; }
.muted { color: var(--ink-dim); }
.faint { color: var(--ink-faint); }
.small { font-size: .875rem; }

/* Instrument label — the little stencilled caps on a cockpit panel */
.label {
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: block;
  margin-bottom: .5rem;
}
.label--cyan  { color: var(--cyan-dim); }
.label--amber { color: var(--amber-dim); }

/* ------------------------------------------------------------------- header */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,12,16,.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 32px;
  height: 62px;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 1.0625rem; letter-spacing: -.02em;
  color: var(--ink); text-decoration: none; flex-shrink: 0;
}
.brand:hover { color: var(--ink); }
.brand svg { display: block; }

.nav { display: flex; gap: 26px; margin-left: auto; align-items: center; }
.nav a {
  color: var(--ink-dim); text-decoration: none;
  font-size: .9375rem; white-space: nowrap;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* `.nav a` (0,1,1) outranks `.btn--primary` (0,1,0), so without these the CTA
   in the header inherits the muted link colour and renders grey-on-cyan.
   Match the selector weight rather than reaching for !important. */
.nav a.btn--primary, .nav a.btn--primary:hover { color: #05181b; }
.nav a.btn--amber,   .nav a.btn--amber:hover   { color: #1c1200; }
.nav a.btn--ghost,   .nav a.btn--ghost:hover   { color: var(--ink); }

.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--line-bright);
  color: var(--ink); border-radius: var(--radius);
  width: 44px; height: 44px; cursor: pointer; font-size: 1.125rem; line-height: 1;
}

/* Keyboard focus needs to read clearly against the instrument-panel ground;
   the browser default outline is too thin against near-black. Mouse users
   never see this, :focus-visible skips the click-triggered focus ring. */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* Off-screen until focused, then docked at the top-left — lets a keyboard or
   screen-reader user jump past the header nav straight into the page content. */
.skip-link {
  position: absolute;
  top: -48px; left: 12px;
  background: var(--amber); color: #1c1200;
  font-weight: 600; font-size: .9375rem;
  padding: 10px 16px; border-radius: var(--radius);
  z-index: 100;
  transition: top .15s ease;
}
.skip-link:focus {
  top: 12px;
}

@media (max-width: 760px) {
  .nav {
    position: absolute; top: 62px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-panel); border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
  }
  .nav[hidden] { display: none; }
  .nav a { padding: 11px 0; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .nav .btn { margin-top: 12px; text-align: center; }
  .nav-toggle { display: block; }
}

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-block;
  font: 600 .9375rem/1 var(--sans);
  padding: 13px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--cyan); color: #05181b; border-color: var(--cyan);
}
.btn--primary:hover { background: #74e2ec; color: #05181b; }

.btn--amber {
  background: var(--amber); color: #1c1200; border-color: var(--amber);
}
.btn--amber:hover { background: #ffbe45; color: #1c1200; }

.btn--ghost {
  background: transparent; color: var(--ink); border-color: var(--line-bright);
}
.btn--ghost:hover { background: var(--bg-panel-2); color: var(--ink); border-color: var(--ink-faint); }

.btn--lg { padding: 16px 30px; font-size: 1rem; }
.btn--block { display: block; width: 100%; text-align: center; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ------------------------------------------------------------------- panels */

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
}
.panel--inset { background: var(--bg-inset); }
.panel--flush { padding: 0; overflow: hidden; }

/* Rivet corners — subtle cockpit-panel detail */
.panel--riveted { position: relative; }
.panel--riveted::before,
.panel--riveted::after {
  content: "";
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: var(--line-bright);
}
.panel--riveted::before { top: 9px; left: 9px;  box-shadow: calc(100% + 0px) 0 0 var(--line-bright); }
.panel--riveted::after  { bottom: 9px; left: 9px; box-shadow: calc(100% + 0px) 0 0 var(--line-bright); }

/* -------------------------------------------------------------- layout bits */

.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section--alt { background: var(--bg-panel); border-block: 1px solid var(--line); }

.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid--3 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .grid--2 { grid-template-columns: 1fr; } }

.stack > * + * { margin-top: 1rem; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }

/* --------------------------------------------------------------------- hero */

.hero { padding: 96px 0 72px; position: relative; }
.hero h1 { max-width: 18ch; }
.hero .lede { margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.hero-note {
  font-family: var(--mono); font-size: .75rem; color: var(--ink-faint);
  margin-top: 1.25rem;
}

/* ------------------------------------------------------------------- gauges */

/* The score dial on the results screen */
.gauge { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.gauge-dial { position: relative; width: 148px; height: 148px; flex-shrink: 0; }
.gauge-dial svg { transform: rotate(-90deg); display: block; }
.gauge-readout {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--mono);
}
.gauge-value { font-size: 2.5rem; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.gauge-unit  { font-size: .6875rem; color: var(--ink-faint); letter-spacing: .16em; margin-top: 5px; }

.score-good  { color: var(--green); }
.score-warn  { color: var(--amber); }
.score-bad   { color: var(--red); }
.stroke-good { stroke: var(--green); }
.stroke-warn { stroke: var(--amber); }
.stroke-bad  { stroke: var(--red); }

/* Horizontal bar meters */
.meter { margin-bottom: 16px; }
.meter-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: .75rem; margin-bottom: 6px;
}
.meter-head b { font-weight: 600; color: var(--ink); letter-spacing: .04em; }
.meter-head span { color: var(--ink-faint); }
.meter-track { height: 6px; background: var(--bg-inset); border-radius: 3px; overflow: hidden; border: 1px solid var(--line); }
.meter-fill { height: 100%; border-radius: 3px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.fill-good { background: var(--green); }
.fill-warn { background: var(--amber); }
.fill-bad  { background: var(--red); }

/* --------------------------------------------------------------- split view */

/* "What you see" vs "What the parser sees" */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split-pane { background: var(--bg-inset); min-width: 0; }
.split-pane + .split-pane { border-left: 1px solid var(--line); }
@media (max-width: 860px) { .split-pane + .split-pane { border-left: 0; border-top: 1px solid var(--line); } }
.split-head {
  padding: 11px 16px; background: var(--bg-panel-2);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: .6875rem; letter-spacing: .16em; text-transform: uppercase;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.split-body {
  padding: 16px; font-family: var(--mono); font-size: .8125rem; line-height: 1.75;
  max-height: 430px; overflow: auto; white-space: pre-wrap; word-break: break-word;
}
.split-body--lost { color: var(--ink-faint); }
mark.lost { background: rgba(239,90,90,.16); color: var(--red); border-radius: 2px; padding: 0 2px; }
mark.kept { background: rgba(77,212,224,.12); color: var(--cyan); border-radius: 2px; padding: 0 2px; }

/* --------------------------------------------------------------- chips/tags */

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-family: var(--mono); font-size: .75rem;
  padding: 5px 10px; border-radius: 3px;
  border: 1px solid var(--line-bright); background: var(--bg-inset); color: var(--ink-dim);
}
.chip--miss { border-color: rgba(239,90,90,.45); color: #ff9494; background: rgba(239,90,90,.08); }
.chip--hit  { border-color: rgba(77,222,128,.4);  color: #86efac; background: rgba(77,222,128,.07); }

/* -------------------------------------------------------------------- lists */

.findings { list-style: none; padding: 0; margin: 0; }
.findings li {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 15px 0; border-bottom: 1px solid var(--line);
}
.findings li:last-child { border-bottom: 0; }
.findings .sev {
  font-family: var(--mono); font-size: .625rem; letter-spacing: .1em;
  padding: 3px 7px; border-radius: 3px; flex-shrink: 0; margin-top: 3px;
  text-transform: uppercase; font-weight: 600;
}
.sev--crit { background: rgba(239,90,90,.15);  color: #ff8f8f; border: 1px solid rgba(239,90,90,.35); }
.sev--warn { background: rgba(240,168,40,.14); color: var(--amber); border: 1px solid rgba(240,168,40,.32); }
.sev--info { background: rgba(77,212,224,.12); color: var(--cyan); border: 1px solid rgba(77,212,224,.3); }
.sev--pass { background: rgba(77,222,128,.12); color: var(--green); border: 1px solid rgba(77,222,128,.3); }
.findings .body { min-width: 0; }
.findings .body b { display: block; font-weight: 600; margin-bottom: 2px; }
.findings .body p { margin: 0; color: var(--ink-dim); font-size: .9375rem; }

/* checklist */
.ticks { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.ticks li { padding: 8px 0 8px 28px; position: relative; color: var(--ink-dim); }
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 8px;
  color: var(--cyan); font-weight: 700;
}
.ticks--amber li::before { color: var(--amber); }

/* -------------------------------------------------------------------- forms */

label.field { display: block; margin-bottom: 20px; }
label.field > .label { margin-bottom: 7px; }

textarea, input[type="email"], input[type="text"] {
  width: 100%;
  background: var(--bg-inset);
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  color: var(--ink);
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: .875rem;
  line-height: 1.6;
  resize: vertical;
}
textarea:focus, input:focus {
  outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(77,212,224,.13);
}
textarea::placeholder, input::placeholder { color: var(--ink-faint); }
textarea { min-height: 250px; }

.field-foot {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: .6875rem; color: var(--ink-faint); margin-top: 6px;
}

/* ---------------------------------------------------------------- email gate */

.gate {
  border: 1px solid var(--amber-dim);
  background: linear-gradient(180deg, rgba(240,168,40,.06), rgba(240,168,40,.02));
  border-radius: var(--radius-lg);
  padding: 30px;
}
.gate h3 { margin-bottom: .35em; }
.gate-form { display: flex; gap: 10px; margin-top: 18px; }
.gate-form input { flex: 1; }
@media (max-width: 560px) { .gate-form { flex-direction: column; } }

.locked { position: relative; }
.locked > .locked-inner { filter: blur(7px); opacity: .5; pointer-events: none; user-select: none; }
.locked-badge {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--amber);
}

/* ------------------------------------------------------------------ pricing */

.tier {
  display: flex; flex-direction: column;
  background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 28px;
}
.tier--featured { border-color: var(--amber); box-shadow: 0 0 0 1px rgba(240,168,40,.2), 0 18px 50px -22px rgba(240,168,40,.3); }
.tier-name { font-family: var(--mono); font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.tier--featured .tier-name { color: var(--amber); }
.tier-price { font-size: 2.5rem; font-weight: 700; letter-spacing: -.03em; margin: 10px 0 2px; }
.tier-price small { font-size: .875rem; font-weight: 400; color: var(--ink-faint); letter-spacing: 0; }
.tier-desc { color: var(--ink-dim); font-size: .9375rem; margin-bottom: 20px; }
.tier .btn { margin-top: auto; }
.tier ul { margin-bottom: 22px; }

/* -------------------------------------------------------------------- steps */

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 30px 52px; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0;
  font-family: var(--mono); font-size: .8125rem; font-weight: 600;
  color: var(--cyan);
  width: 34px; height: 34px; border: 1px solid var(--cyan-dim); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-inset);
}
.steps li::after {
  content: ""; position: absolute; left: 17px; top: 38px; bottom: 6px; width: 1px;
  background: var(--line-bright);
}
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps h3 { margin-bottom: .25em; }
.steps p { color: var(--ink-dim); margin: 0; }

/* --------------------------------------------------------------------- misc */

.callout {
  border-left: 2px solid var(--amber);
  background: rgba(240,168,40,.05);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-dim);
  font-size: .9375rem;
}
.callout b { color: var(--ink); }

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

.badge-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.badge {
  font-family: var(--mono); font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid var(--line-bright); border-radius: 100px;
  padding: 5px 12px; color: var(--ink-faint);
}

.faq dt { font-weight: 600; margin-top: 22px; }
.faq dd { margin: 6px 0 0; color: var(--ink-dim); }

/* ------------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 46px 0 60px;
  margin-top: 40px;
  color: var(--ink-faint);
  font-size: .875rem;
}
.footer-grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--ink-dim); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

/* --------------------------------------------------------------- utilities */

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

.spinner {
  display: inline-block; width: 13px; height: 13px;
  border: 2px solid rgba(5,24,27,.3); border-top-color: #05181b;
  border-radius: 50%; animation: spin .7s linear infinite;
  vertical-align: -2px; margin-right: 7px;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
