/* Roots web funnel — calm/warm theme, no framework. */
:root {
  --paper: #F4F1EA;
  --paper-2: #FBF9F4;
  --ink: #2C2C2C;
  --olive: #6B6B60;
  --moss: #5A7A5A;
  --moss-deep: #4A6A4A;
  --gold: #C2A368;
  --sage: #DCE3D5;
  --sage-2: #EAEFE4;
  --line: rgba(107, 107, 96, 0.18);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.07);
  --serif: ui-serif, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ---- Layout shell ---- */
#app { min-height: 100vh; display: flex; flex-direction: column; }

header.onb-header {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 16px 20px 0;
}
header.onb-header img.logo { height: 26px; width: auto; opacity: 0.92; }

/* Segmented progress bar */
.progress { width: 100%; max-width: 520px; display: flex; gap: 5px; }
.progress .seg {
  flex: 1; height: 4px; border-radius: 4px;
  background: var(--sage); overflow: hidden;
}
.progress .seg .fill {
  display: block; height: 100%; width: 0;
  background: var(--moss); border-radius: 4px;
  transition: width 0.45s ease;
}

main.screen {
  flex: 1; width: 100%; max-width: 520px; margin: 0 auto;
  padding: 24px 24px 120px; display: flex; flex-direction: column;
}
.screen-enter { animation: fadeUp 0.4s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Typography */
.eyebrow { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--moss); margin: 0 0 10px; }
h1.title { font-family: var(--serif); font-weight: 600; font-size: 1.7rem;
  line-height: 1.2; color: var(--ink); margin: 0 0 10px; }
p.sub { font-size: 1rem; color: var(--olive); margin: 0 0 24px; }

/* Option lists */
.options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.opt {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 16px; border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--paper-2); cursor: pointer; transition: border-color .15s, background .15s, transform .05s;
  font-size: 1rem; color: var(--ink); text-align: left; width: 100%;
}
.opt:hover { border-color: var(--moss); }
.opt:active { transform: scale(0.995); }
.opt.selected { border-color: var(--moss); background: var(--sage-2); }
.opt .ico { width: 22px; height: 22px; flex: 0 0 auto; color: var(--moss); }
.opt .opt-label { flex: 1; }
.opt .opt-sub { display: block; font-size: 0.82rem; color: var(--olive); margin-top: 2px; }
.opt .check { width: 20px; height: 20px; flex: 0 0 auto; color: var(--moss); opacity: 0; transition: opacity .15s; }
.opt.selected .check { opacity: 1; }
.opt .badge { font-size: 0.72rem; font-weight: 600; color: var(--moss);
  background: var(--sage-2); padding: 2px 8px; border-radius: 999px; }

/* Text & form inputs */
.field { width: 100%; padding: 15px 16px; border: 1.5px solid var(--line);
  border-radius: 14px; background: var(--paper-2); font: inherit; color: var(--ink);
  margin-bottom: 12px; }
.field:focus { outline: none; border-color: var(--moss); }
label.field-label { font-size: 0.85rem; color: var(--olive); margin: 0 0 6px; display: block; }

/* Info screens */
.info-img { width: 100%; height: 200px; border-radius: 18px; object-fit: cover;
  background: var(--sage); margin-bottom: 22px; }

/* Live computation / projection card */
.compute-card {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 18px;
  padding: 20px; margin-bottom: 22px; box-shadow: var(--shadow);
}
.compute-card .big { font-family: var(--serif); font-size: 1.5rem; color: var(--moss-deep); }
.gauge { height: 8px; border-radius: 8px; background: var(--sage); overflow: hidden; margin-top: 12px; }
.gauge .fill { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--moss)); width: 0; transition: width 1s ease; }

/* Reveal */
.reveal-name { font-family: var(--serif); font-size: 2rem; color: var(--ink); margin: 4px 0; }
.reveal-quote { font-family: var(--serif); font-style: italic; font-size: 1.15rem;
  color: var(--ink); margin: 16px 0; }

/* Reviews (real) */
.review { background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 10px; }
.review .q { font-family: var(--serif); font-size: 0.98rem; color: var(--ink); }
.review .who { font-size: 0.8rem; color: var(--olive); margin-top: 6px; }

/* Pricing */
.plan { display: flex; align-items: center; justify-content: space-between;
  padding: 16px; border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--paper-2); cursor: pointer; margin-bottom: 10px; }
.plan.selected { border-color: var(--moss); background: var(--sage-2); }
.plan .p-title { font-weight: 600; }
.plan .p-price { font-weight: 600; color: var(--moss-deep); }
.plan .p-save { font-size: 0.72rem; font-weight: 600; color: #fff; background: var(--moss);
  padding: 2px 8px; border-radius: 999px; margin-left: 8px; }

/* Sticky footer CTA */
.footer-cta {
  position: fixed; left: 0; right: 0; bottom: 0; padding: 14px 24px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--paper) 70%, rgba(244, 241, 234, 0));
}
.footer-cta .inner { max-width: 520px; margin: 0 auto; }
.btn {
  width: 100%; border: 0; border-radius: 14px; padding: 16px; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 1.02rem;
  background: var(--moss); color: #fff; transition: opacity .15s, transform .05s;
}
.btn:hover { opacity: 0.92; }
.btn:active { transform: scale(0.99); }
.btn[disabled] { opacity: 0.4; cursor: default; }

.err { color: #b3402f; font-size: 0.85rem; margin: 4px 0 10px; min-height: 1em; }

/* Loader */
.loader-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--sage); border-top-color: var(--moss); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
