/* ──────────────────────────────────────────────────────────────
 * app.css — Migration Cost Calculator layout & components
 * Built on BizStream tokens (styles/tokens.css). Light & airy.
 * Accent is driven by --accent (set live by the Tweaks panel).
 * ────────────────────────────────────────────────────────────── */

* { box-sizing: border-box; }

:root {
  /* Accent pinned to cyan (the production default; Tweaks panel omitted).
     In the prototype these were set live via JS — here they're static. */
  --accent: var(--bzs-cyan);
  --accent-deep: var(--bzs-cyan-700);
  --accent-soft: var(--bzs-cyan-50);
  --accent-ring: rgba(0, 196, 233, 0.32);
  --accent-fg: var(--bzs-navy);
}

html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-muted);
  color: var(--fg);
  font-family: var(--font-body);
  min-height: 100vh;
}

button { font-family: inherit; }

/* ── App shell ──────────────────────────────────────────────── */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.topbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--bzs-navy);
}
.brand .mark { width: 26px; height: 26px; display: block; color: var(--accent); }
.brand .mark svg { width: 100%; height: 100%; display: block; }
.brand .wm {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--bzs-navy);
}
.topbar .save-note {
  font-size: var(--text-xs);
  color: var(--fg-subtle);
  display: flex;
  align-items: center;
  gap: 7px;
}
.topbar .save-note i { color: var(--accent-deep); }

/* ── Centered stage ─────────────────────────────────────────── */
.stage {
  width: 100%;
  max-width: 760px;
  padding: 8px 24px 64px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ── Progress ───────────────────────────────────────────────── */
.progress {
  margin: 14px 0 30px;
}
.progress .meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.progress .step-label {
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--bzs-navy);
}
.progress .pct {
  font-size: var(--text-xs);
  color: var(--fg-subtle);
  font-weight: var(--fw-medium);
}

/* bar style */
.bar-track {
  height: 8px;
  background: var(--bzs-neutral-100);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-pill);
  transition: width .4s cubic-bezier(.4,0,.2,1);
}

/* dots style */
.dots { display: flex; gap: 8px; align-items: center; }
.dots .dot {
  height: 8px; flex: 1;
  background: var(--bzs-neutral-100);
  border-radius: var(--radius-pill);
  transition: background .3s ease;
}
.dots .dot.done { background: var(--accent); }
.dots .dot.active { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }

/* steps (numbered nodes) style */
.steps { display: flex; align-items: center; gap: 0; }
.steps .node {
  width: 26px; height: 26px; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: var(--fw-bold);
  background: var(--bzs-neutral-100); color: var(--fg-subtle);
  font-family: var(--font-display);
  transition: all .3s ease;
}
.steps .node.done { background: var(--accent); color: #fff; }
.steps .node.active { background: var(--bzs-navy); color: #fff; box-shadow: 0 0 0 3px var(--accent-ring); }
.steps .seg { flex: 1; height: 3px; background: var(--bzs-neutral-100); border-radius: 2px; transition: background .3s ease; }
.steps .seg.done { background: var(--accent); }

/* ── Card / panel ───────────────────────────────────────────── */
.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 38px 40px 32px;
  animation: panelIn .42s cubic-bezier(.16,.84,.44,1) both;
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sec-head { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.sec-icon {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: var(--radius-lg);
  background: var(--accent-soft);
  color: var(--accent-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.sec-icon.hidden { display: none; }
.eyebrow {
  font-weight: var(--fw-bold);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 3px;
}
.sec-title {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--text-3xl);
  line-height: 1.12;
  color: var(--bzs-navy);
  letter-spacing: -0.01em;
}
.sec-blurb {
  color: var(--fg-muted);
  font-size: var(--text-base);
  line-height: 1.5;
  margin-top: 14px;
  max-width: 56ch;
}

.q-list { margin-top: 28px; display: flex; flex-direction: column; gap: 30px; }

/* question reveal animation */
.q-block { animation: revealIn .4s cubic-bezier(.16,.84,.44,1) both; }
@keyframes revealIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.q-label {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--text-lg);
  color: var(--bzs-navy);
  line-height: 1.35;
}
.q-hint {
  font-size: var(--text-sm);
  color: var(--fg-subtle);
  font-weight: var(--fw-medium);
  margin-top: 3px;
}

/* ── Option cards ───────────────────────────────────────────── */
.opts { margin-top: 14px; display: grid; gap: 12px; }
.opts.cols-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .opts.cols-2 { grid-template-columns: 1fr; } }

.opt {
  position: relative;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  background: #fff;
  border: 2px solid var(--bzs-neutral-100);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .08s ease;
}
.opt:hover { border-color: var(--accent); background: #fff; }
.opt:active { transform: translateY(1px); }
.opt:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.opt.sel {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.opt .tick {
  width: 22px; height: 22px; flex-shrink: 0; margin-top: 1px;
  border-radius: 50%;
  border: 2px solid var(--bzs-neutral-200);
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  transition: all .15s ease;
  color: #fff; font-size: 11px;
}
.opt.multi .tick { border-radius: 6px; }
.opt.sel .tick { background: var(--accent); border-color: var(--accent); }
.opt .tick i { opacity: 0; transition: opacity .12s ease; }
.opt.sel .tick i { opacity: 1; }
.opt .otext { flex: 1; }
.opt .otitle {
  display: block;
  font-weight: var(--fw-semibold);
  font-size: var(--text-base);
  color: var(--bzs-navy);
  line-height: 1.3;
}
.opt .odesc {
  display: block;
  font-size: var(--text-sm);
  color: var(--fg-muted);
  line-height: 1.45;
  margin-top: 3px;
}

/* inline "other" text field that appears under a selected option */
.opt-text {
  margin-top: 10px;
  animation: revealIn .3s ease both;
}

/* ── Text inputs ────────────────────────────────────────────── */
.field {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--fg);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field::placeholder { color: var(--bzs-neutral-400); }
.field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
textarea.field { resize: vertical; min-height: 92px; line-height: 1.5; }
.field-label {
  display: block;
  font-weight: var(--fw-semibold);
  font-size: var(--text-sm);
  color: var(--bzs-navy);
  margin-bottom: 7px;
}

/* ── Footer nav ─────────────────────────────────────────────── */
.nav {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav .spacer { flex: 1; }

.btn {
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--text-base);
  border-radius: var(--radius-pill);
  border: 0;
  cursor: pointer;
  padding: 13px 28px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .08s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.btn-primary { background: var(--bzs-blue); color: #fff; }
.btn-primary:hover { background: var(--bzs-navy); }
.btn-accent { background: var(--accent); color: var(--accent-fg, var(--bzs-navy)); }
.btn-accent:hover { filter: brightness(.95); }
.btn-ghost { background: transparent; color: var(--fg-muted); padding-left: 14px; padding-right: 14px; }
.btn-ghost:hover { color: var(--bzs-navy); background: var(--bzs-neutral-100); }
.btn-link {
  background: transparent;
  color: var(--fg-subtle);
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--text-sm);
  padding: 8px 6px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--bzs-neutral-300);
}
.btn-link:hover { color: var(--bzs-navy); }
.btn[disabled] { background: var(--bzs-neutral-100); color: var(--bzs-neutral-400); cursor: not-allowed; }
.btn[disabled]:active { transform: none; }

/* ── Intro screen ───────────────────────────────────────────── */
.intro { text-align: center; padding: 48px 44px 40px; }
.intro .kicker {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-soft); color: var(--accent-deep);
  font-weight: var(--fw-bold); font-size: var(--text-xs);
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 7px 14px; border-radius: var(--radius-pill);
  margin-bottom: 22px;
}
.intro h1 {
  font-family: var(--font-display);
  font-weight: var(--fw-extra);
  font-size: var(--text-5xl);
  line-height: 1.05;
  color: var(--bzs-navy);
  letter-spacing: -0.02em;
  margin: 0 auto;
  max-width: 22ch;
}
.intro h1 .headline-line { display: block; }
.intro p {
  color: var(--fg-muted);
  font-size: var(--text-lg);
  line-height: 1.55;
  max-width: 52ch;
  margin: 18px auto 0;
}
.intro .meta-row {
  display: flex; justify-content: center; gap: 26px; flex-wrap: wrap;
  margin: 28px 0 30px;
}
.intro .meta-item {
  display: flex; align-items: center; gap: 9px;
  font-size: var(--text-sm); color: var(--fg-muted); font-weight: var(--fw-medium);
}
.intro .meta-item i { color: var(--accent-deep); font-size: 15px; }
.intro .start-row { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.intro .btn-primary { font-size: var(--text-lg); padding: 16px 36px; }

/* ── Result screen ──────────────────────────────────────────── */
.result-hero {
  text-align: center;
  padding: 40px 40px 36px;
  background: var(--bzs-navy);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}
.result-hero .pattern { position: absolute; inset: 0; opacity: .5; }
.result-hero .inner { position: relative; }
.result-hero .eyebrow { color: var(--bzs-cyan-200); }
.result-hero .ttl {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--text-xl);
  color: #fff; opacity: .92;
  margin-top: 4px;
}
.result-hero .tier-badge {
  display: inline-flex; align-items: center;
  margin-top: 10px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--text-sm);
  padding: 6px 14px; border-radius: var(--radius-pill);
}
.result-hero .figure {
  font-family: var(--font-display);
  font-weight: var(--fw-extra);
  font-size: clamp(32px, 6.4vw, 60px);
  line-height: 1.02;
  color: var(--bzs-cyan);
  letter-spacing: -0.02em;
  margin: 18px 0 6px;
  white-space: nowrap;
}
.result-hero .sub { color: rgba(255,255,255,.78); font-size: var(--text-sm); }
.result-hero .placeholder-tag {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 18px;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.18);
  font-size: var(--text-xs); font-weight: var(--fw-medium);
  padding: 6px 13px; border-radius: var(--radius-pill);
}

.calc-cta { text-align: center; padding: 44px 40px; }

/* ── Cost breakdown / enterprise note ───────────────────────── */
.breakdown {
  margin-top: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 8px 22px;
}
.breakdown .brow {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--text-base);
}
.breakdown .brow:last-child { border-bottom: 0; }
.breakdown .brow .bl { color: var(--fg-muted); font-weight: var(--fw-medium); }
.breakdown .brow .bv { color: var(--bzs-navy); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }
.breakdown .brow.total .bl { color: var(--bzs-navy); font-weight: var(--fw-bold); font-family: var(--font-display); }
.breakdown .brow.total .bv { color: var(--accent-deep); font-weight: var(--fw-bold); font-size: var(--text-lg); }

.ent-note {
  margin-top: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
}
.ent-note .ent-title {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: var(--text-base); color: var(--bzs-navy);
  margin-bottom: 14px;
}
.ent-note .ent-title i { color: var(--accent-deep); }
.calc-cta h2 {
  font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: var(--text-3xl); color: var(--bzs-navy); letter-spacing: -0.01em;
}
.calc-cta p { color: var(--fg-muted); font-size: var(--text-base); margin: 12px auto 26px; max-width: 46ch; line-height: 1.5; }
.summary-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 28px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--bzs-neutral-50); border: 1px solid var(--border);
  color: var(--fg-muted); font-size: var(--text-xs); font-weight: var(--fw-semibold);
  padding: 7px 13px; border-radius: var(--radius-pill);
}
.chip i { color: var(--accent-deep); font-size: 12px; }

.calc-spin { display: inline-flex; align-items: center; gap: 10px; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Lead form ──────────────────────────────────────────────── */
.lead { margin-top: 24px; }
.lead-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm); padding: 32px 36px;
}
.lead-card h3 { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: var(--text-2xl); color: var(--bzs-navy); }
.lead-card .opt-note { color: var(--fg-subtle); font-size: var(--text-sm); margin-top: 4px; }
.lead-grid { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.lead-grid .full { grid-column: 1 / -1; }
.form-error {
  margin-top: 16px;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  background: #fef2f2;
  color: #991b1b;
  padding: 12px 14px;
  font-size: var(--text-sm);
}
@media (max-width: 560px) { .lead-grid { grid-template-columns: 1fr; } }
.consent { display: flex; gap: 12px; align-items: flex-start; margin-top: 4px; }
.toggle-pair { display: flex; gap: 8px; }
.toggle-pair .tb {
  flex: 1; text-align: center; padding: 11px; border-radius: var(--radius-md);
  border: 2px solid var(--bzs-neutral-100); background: #fff; cursor: pointer;
  font-weight: var(--fw-semibold); font-size: var(--text-sm); color: var(--fg-muted);
  transition: all .15s ease;
}
.toggle-pair .tb:hover { border-color: var(--accent); }
.toggle-pair .tb.on { border-color: var(--accent); background: var(--accent-soft); color: var(--bzs-navy); }

.thanks { text-align: center; padding: 50px 40px; }
.thanks .ok {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin: 0 auto 20px;
}
.thanks h3 { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: var(--text-3xl); color: var(--bzs-navy); }
.thanks p { color: var(--fg-muted); font-size: var(--text-base); margin: 10px auto 0; max-width: 42ch; line-height: 1.5; }

.restart-row { text-align: center; margin-top: 22px; }

/* ── Tweaks panel overrides ─────────────────────────────────── */
.tp-panel, .tweaks-panel { font-family: var(--font-body); }
