/* ═══════════════════════════════════════════════════════════════════
   JP ELECTRICAL — AI READINESS AUDIT
   Cipher Shinobi DAO design language.
   Dark mode is the only mode. Sharp corners. Swiss grid discipline.
   Tokens lifted verbatim from cipher-shinobi/colors_and_type.css.
   (Typekit neue-haas-unica is domain-locked → Inter is the working sans.)
   ═══════════════════════════════════════════════════════════════════ */

@import url("https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@300;400;500;600&family=Inter:wght@300;400;500;600&display=swap");

:root {
  /* Backgrounds (deepest → elevated) */
  --bg-page:     #000000;
  --bg-surface:  #0C0E12;
  --bg-inset:    #13161B;
  --bg-elevated: #25272C;
  --bg-card:     #373A41;

  /* Text */
  --text-primary:   #FFFFFF;
  --text-body:      #E0E0E0;
  --text-secondary: #CCCCCC;
  --text-muted:     #94979C;
  --text-dim:       #85888E;
  --text-deep:      #373A41;

  /* Functional */
  --accent:      #FA5D19;
  --accent-deep: #E62E05;
  --line:        #61656C;
  --line-dim:    #373A41;

  --font-sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Roboto Mono", "SF Mono", "Fira Mono", Consolas, monospace;

  --fs-display: 42px; --lh-display: 48px;
  --tracking-h1: 0.15em;
  --tracking-h2: 0.10em;
  --tracking-eyebrow: 0.18em;

  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px;
  --space-5:24px; --space-6:32px; --space-7:48px; --space-8:64px;

  --ease: cubic-bezier(0.2, 0, 0.2, 1);
  --dur: 320ms;
}

* { box-sizing: border-box; border-radius: 0; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body {
  background: var(--bg-page);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

::selection { background: var(--accent); color: #fff; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; }

/* Faint scanline grid — terminal texture, very subtle */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--line-dim) 0.5px, transparent 0.5px),
    linear-gradient(90deg, var(--line-dim) 0.5px, transparent 0.5px);
  background-size: 64px 64px;
  opacity: 0.10;
}

/* ── App shell ──────────────────────────────────────────────────── */
.app {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  min-height: 100vh;
  max-width: 880px; margin: 0 auto;
  padding: 0 var(--space-5);
}

/* ── Header bar ─────────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--line);
  gap: var(--space-4);
}
.brand { display: flex; align-items: center; gap: var(--space-3); }
.brand__mark { width: 26px; height: 26px; display: block; }
.brand__mark svg, .brand__mark img { width: 100%; height: 100%; display: block; }
.brand__txt {
  font-family: var(--font-mono); font-weight: 500; font-size: 11px;
  text-transform: uppercase; letter-spacing: var(--tracking-h2);
  color: var(--text-primary); line-height: 1.3;
}
.brand__txt span { display: block; color: var(--text-muted); font-weight: 400; letter-spacing: 0.06em; }
.topbar__meta {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase; color: var(--text-dim); text-align: right; line-height: 1.6;
}
.topbar__meta b { color: var(--accent); font-weight: 500; }

/* ── Progress rail ──────────────────────────────────────────────── */
.progress {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) 0; border-bottom: 1px solid var(--line-dim);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase; color: var(--text-muted);
}
.progress__track { flex: 1; height: 2px; background: var(--bg-elevated); position: relative; overflow: hidden; }
.progress__fill { position: absolute; inset: 0 100% 0 0; background: var(--accent); transition: right var(--dur) var(--ease); }
.progress__count { white-space: nowrap; color: var(--text-secondary); }
.progress__count b { color: var(--text-primary); }
.is-intro .progress, .is-done .progress { visibility: hidden; }

/* ── Stage (the one-question viewport) ──────────────────────────── */
.stage {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: var(--space-8) 0;
}
.card { animation: rise var(--dur) var(--ease) both; }
.card.is-leaving { animation: fall 180ms var(--ease) both; }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fall { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-12px); } }

/* Question header */
.q__kicker {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
  color: var(--accent); margin-bottom: var(--space-4);
  border: 1px solid var(--line); padding: 5px var(--space-3);
}
.q__kicker .sec { color: var(--text-muted); }
.q__index {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-dim);
  letter-spacing: var(--tracking-h2); margin-bottom: var(--space-3);
}
.q__index b { color: var(--accent); }
.q__label {
  font-size: clamp(22px, 3.4vw, 30px); line-height: 1.25; font-weight: 500;
  color: var(--text-primary); letter-spacing: -0.01em; max-width: 36ch;
}
.q__help { margin-top: var(--space-3); color: var(--text-muted); font-size: 15px; max-width: 52ch; }
.q__optional { color: var(--text-dim); font-weight: 400; font-size: 0.7em; }

/* Options */
.options { margin-top: var(--space-6); display: flex; flex-direction: column; gap: var(--space-2); }
.opt {
  display: flex; align-items: center; gap: var(--space-3);
  width: 100%; text-align: left;
  padding: var(--space-4) var(--space-4);
  border: 1px solid var(--line);
  background: var(--bg-surface); color: var(--text-body);
  font-size: 16px; transition: all var(--dur) var(--ease);
}
.opt:hover { border-color: var(--text-secondary); background: var(--bg-inset); }
.opt__key {
  flex: none; width: 26px; height: 26px; display: grid; place-items: center;
  border: 1px solid var(--line); font-family: var(--font-mono);
  font-size: 11px; color: var(--text-muted); transition: all var(--dur) var(--ease);
}
.opt__txt { flex: 1; }
.opt__tick { flex: none; font-family: var(--font-mono); font-size: 12px; color: var(--accent); opacity: 0; }
.opt.is-selected { border-color: var(--accent); background: rgba(250,93,25,0.07); color: var(--text-primary); }
.opt.is-selected .opt__key { border-color: var(--accent); background: var(--accent); color: #000; }
.opt.is-selected .opt__tick { opacity: 1; }
.opt.is-disabled { opacity: 0.38; pointer-events: none; }

/* Scale */
.scale { margin-top: var(--space-6); display: flex; gap: var(--space-2); }
.scale__btn {
  flex: 1; aspect-ratio: 1 / 1; max-width: 96px;
  border: 1px solid var(--line); background: var(--bg-surface);
  font-family: var(--font-mono); font-size: 22px; color: var(--text-secondary);
  display: grid; place-items: center; transition: all var(--dur) var(--ease);
}
.scale__btn:hover { border-color: var(--text-secondary); }
.scale__btn.is-selected { border-color: var(--accent); background: var(--accent); color: #000; }
.scale__ends { display: flex; justify-content: space-between; margin-top: var(--space-3);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }

/* Text / textarea / number / contact */
.field { margin-top: var(--space-6); }
.field input, .field textarea {
  width: 100%; background: transparent; color: var(--text-primary);
  border: none; border-bottom: 1px solid var(--line);
  padding: var(--space-3) 0; font-size: 22px; line-height: 1.4;
  transition: border-color var(--dur) var(--ease);
}
.field textarea { font-size: 18px; resize: vertical; min-height: 72px; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); }
.field input::placeholder, .field textarea::placeholder { color: var(--text-deep); }
.field + .field { margin-top: var(--space-4); }
.field__label {
  display: block; font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
  color: var(--text-muted); margin-bottom: var(--space-1);
}

/* ── Footer nav ─────────────────────────────────────────────────── */
.foot {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-5) 0; border-top: 1px solid var(--line-dim);
}
.btn {
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  letter-spacing: var(--tracking-h2); text-transform: uppercase;
  padding: var(--space-3) var(--space-5); border: 1px solid var(--line);
  color: var(--text-primary); background: var(--bg-surface);
  transition: all var(--dur) var(--ease);
}
.btn:hover { border-color: var(--text-primary); }
.btn--primary { border-color: var(--accent); background: var(--accent); color: #000; }
.btn--primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--text-muted); }
.btn--ghost:hover { color: var(--text-primary); border-color: var(--text-muted); }
.btn:disabled { opacity: 0.35; pointer-events: none; }
.foot__spacer { flex: 1; }
.foot__hint { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }
.foot__hint kbd {
  font-family: var(--font-mono); border: 1px solid var(--line); padding: 1px 6px;
  color: var(--text-secondary); font-size: 10px;
}
@media (max-width: 560px) { .foot__hint { display: none; } }

/* ── Intro screen ───────────────────────────────────────────────── */
.intro { animation: rise var(--dur) var(--ease) both; }
.intro__eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase; color: var(--accent); margin-bottom: var(--space-5);
  display: flex; align-items: center; gap: var(--space-3);
}
.intro__eyebrow::before { content: "[ "; } .intro__eyebrow::after { content: " ]"; }
.intro__title {
  font-family: var(--font-mono); font-weight: 300; font-size: clamp(32px, 6vw, var(--fs-display));
  line-height: 1.06; text-transform: uppercase; color: var(--text-primary);
  letter-spacing: -0.01em;
}
.intro__title b { color: var(--accent); font-weight: 400; }
.intro__lede { margin-top: var(--space-5); font-size: 18px; color: var(--text-body); max-width: 56ch; line-height: 1.6; }
.intro__lede strong { color: var(--text-primary); font-weight: 500; }
.intro__specs {
  margin-top: var(--space-6); display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
}
.spec { padding: var(--space-4); border-right: 1px solid var(--line-dim); }
.spec:last-child { border-right: none; }
.spec__k { font-family: var(--font-mono); font-size: 10px; letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--text-muted); }
.spec__v { margin-top: 6px; font-family: var(--font-mono); font-size: 18px; color: var(--text-primary); }
.intro__cta { margin-top: var(--space-7); display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
@media (max-width: 560px) { .intro__specs { grid-template-columns: 1fr; } .spec { border-right: none; border-bottom: 1px solid var(--line-dim); } .spec:last-child { border-bottom: none; } }

/* ── Done screen ────────────────────────────────────────────────── */
.done { animation: rise var(--dur) var(--ease) both; text-align: left; padding: var(--space-7) 0; }
.done__badge {
  display: inline-block; font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--accent);
  border: 1px solid var(--accent); padding: 6px var(--space-4); margin-bottom: var(--space-5);
}
.done__title { font-family: var(--font-mono); font-weight: 300; font-size: clamp(28px, 5vw, 38px); text-transform: uppercase; color: var(--text-primary); line-height: 1.1; }
.done__msg { margin-top: var(--space-5); font-size: 18px; color: var(--text-body); max-width: 56ch; line-height: 1.6; }
.done__row { margin-top: var(--space-6); display: flex; gap: var(--space-3); flex-wrap: wrap; }
.done__status { margin-top: var(--space-5); font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.done__status b { color: var(--accent); }

/* ── Validation note ────────────────────────────────────────────── */
.note { margin-top: var(--space-4); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); min-height: 14px; }

/* ── Sign-off footer ────────────────────────────────────────────── */
.signoff {
  padding: var(--space-4) 0; border-top: 1px solid var(--line-dim);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-dim);
}
.signoff .cjk { font-size: 12px; letter-spacing: 0.2em; color: var(--text-muted); }

/* Hidden Netlify-detect form */
.netlify-probe { position: absolute; left: -9999px; height: 0; overflow: hidden; }
