/* Bookhand landing — plain CSS, mobile-first, no build step.
   Committed light "paper ledger" look. */

:root {
  --paper: #faf7f0;
  --paper-2: #f2ecdf;
  --ink: #23231f;
  --ink-soft: #56534a;
  --green: #1e6f50;
  --green-soft: #e3efe8;
  --red: #b3382e;
  --amber: #a5690a;
  --amber-bg: #fdf3df;
  --rule: #d9d2c2;
  --max: 62rem;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.9rem, 5.5vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3.6vw, 2rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
em { font-style: italic; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 0.5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--ink);
  color: var(--ink);
  background: transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
}
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn-primary:hover { background: #185c42; border-color: #185c42; }
.btn-link { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
.btn-link:hover { color: var(--ink); }

/* ---------- verify placeholders (must look unfinished) ---------- */
.verify {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8em;
  color: var(--amber);
  background: var(--amber-bg);
  border: 1px dashed var(--amber);
  border-radius: 4px;
  padding: 0.05em 0.4em;
  white-space: nowrap;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 8vw, 5rem) 1.25rem 2rem;
  text-align: center;
}
.hero-logo {
  position: absolute;
  top: 1.1rem; left: 1.25rem;
  display: inline-block;
  line-height: 0;
}
.hero-logo img { width: 2.75rem; height: 2.75rem; opacity: 0.9; }
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 2rem;
}
.hero h1 { max-width: 22ch; margin-inline: auto; }
.hero-sub { max-width: 44rem; margin: 1rem auto 1.75rem; color: var(--ink-soft); font-size: 1.15rem; }
.hero-ctas { display: flex; gap: 1.25rem; justify-content: center; align-items: center; flex-wrap: wrap; }
.hero-audience { margin-top: 1.5rem; font-size: 0.9rem; color: var(--ink-soft); }
.hero-proof {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green);
}
.hero-path { display: block; width: min(100%, 40rem); margin: 2rem auto 0; }

/* ---------- shared SVG styling ---------- */
svg .paper { fill: #fff; stroke-width: 2; }
svg .ink { stroke: var(--ink); stroke-width: 2; fill: none; stroke-linecap: round; }
svg .ink .paper { stroke: var(--ink); }
svg .ink-fill { fill: var(--ink); stroke: none; }
svg .green { stroke: var(--green); stroke-width: 2; fill: none; stroke-linecap: round; }
svg .green .paper { stroke: var(--green); }
svg .green-fill { fill: var(--green-soft); stroke: none; }
svg .dotted { stroke-dasharray: 2 6; fill: none; stroke: var(--ink-soft); stroke-width: 2.5; stroke-linecap: round; }
svg .tick, svg .tick-lg { stroke: var(--green); stroke-width: 3; fill: none; }
svg .tick-lg { stroke-width: 4; }
svg .tag { fill: var(--green-soft); stroke: var(--green); }
svg .red-row { fill: #f9e3e0; stroke: var(--red); stroke-width: 1.5; }
svg .red-t { fill: var(--red); stroke: none; }
svg .red-x { stroke: var(--red); stroke-width: 3; }
svg .dim { opacity: 0.75; }
svg .lbl { font-family: var(--font-body); font-size: 11px; fill: var(--ink-soft); stroke: none; }
svg .num { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; fill: var(--ink); stroke: none; }
svg .strike { text-decoration: line-through; fill: var(--ink-soft); }
svg .eq { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; fill: var(--ink); stroke: none; }
svg .eq-strong { font-weight: 700; fill: var(--green); }

/* ---------- acts & scenes ---------- */
.act { max-width: var(--max); margin: 0 auto; padding: 3rem 1.25rem; }
.act-label {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-top: 2px solid var(--rule);
  padding-top: 1rem;
  margin-bottom: 2.5rem;
}
.scene {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 4rem;
  align-items: center;
}
.scene:last-child { margin-bottom: 0; }
.scene-art svg { display: block; width: 100%; height: auto; max-width: 24rem; margin: 0 auto; }
.scene-art figcaption { text-align: center; margin-top: 0.5rem; }
figure { margin: 0; }

@media (min-width: 46rem) {
  .scene { grid-template-columns: 1.1fr 1fr; gap: 3rem; }
  .scene:nth-of-type(even) .scene-copy { order: 2; }
}

/* ---------- act 2: the ride ---------- */
.act-ride { position: relative; }
.rail {
  position: absolute;
  top: 6rem; bottom: 2rem; left: 2rem;
  width: 3px;
  background: repeating-linear-gradient(to bottom, var(--rule) 0 6px, transparent 6px 14px);
  border-radius: 2px;
}
.rail-progress { width: 100%; height: 0%; background: var(--green); border-radius: 2px; }
@supports (animation-timeline: view()) {
  .act-ride { view-timeline: --ride block; }
  .rail-progress { animation: rail-grow linear forwards; animation-timeline: --ride; }
  @keyframes rail-grow { from { height: 0%; } to { height: 100%; } }
}
@media (prefers-reduced-motion: reduce) {
  .rail-progress { animation: none; height: 100%; }
}

.station {
  position: relative;
  padding-left: 4.25rem;
  margin-bottom: 4.5rem;
  max-width: 40rem;
}
.station:last-child { margin-bottom: 0; }
.station-num {
  position: absolute;
  left: 0.7rem; top: -0.1rem;
  transform: translateX(-50%) ;
  left: calc(2rem + 1.5px);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green);
  background: var(--paper);
  border: 2px solid var(--green);
  border-radius: 999px;
  width: 2.4rem; height: 2.4rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0;
}
.station .scene-art svg { margin: 1.25rem 0 0; max-width: 22rem; }

@media (max-width: 30rem) {
  .rail { left: 1.1rem; }
  .station { padding-left: 3rem; }
  .station-num { left: calc(1.1rem + 1.5px); width: 2rem; height: 2rem; font-size: 0.7rem; }
}

/* ---------- app mockups (bh- = the Bookhand app's own design tokens) ----------
   Static HTML/CSS reproductions of the real UI — real text, no images.
   Tokens mirror the app: bg #f6f7f9, card #fff, ink #1a1d21, muted #5b6470,
   line #e3e7ec, green #1a7f4b, amber #9a6700; system font; 12px card radius. */
.mock { margin: 1.25rem 0 0; }
.mock-caption {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.bh-frame, .bh-phone {
  --bh-bg: #f6f7f9;
  --bh-card: #ffffff;
  --bh-ink: #1a1d21;
  --bh-muted: #5b6470;
  --bh-line: #e3e7ec;
  --bh-green: #1a7f4b;
  --bh-green-bg: #e7f5ec;
  --bh-amber: #9a6700;
  --bh-amber-bg: #fbf3e0;
  --bh-red: #b3261e;
  background: var(--bh-bg);
  color: var(--bh-ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.85rem;
  line-height: 1.4;
  border: 1px solid var(--bh-line);
  border-radius: 14px;
  padding: 0.9rem;
  max-width: 26rem;
  box-shadow: 0 6px 24px rgba(35, 35, 31, 0.08);
}
.bh-phone {
  max-width: 19rem;
  border-radius: 22px;
  border-width: 6px;
  border-color: #d5d0c4;
  padding: 1rem 0.8rem;
}
.bh-app { display: flex; flex-direction: column; gap: 0.6rem; }
.bh-top, .bh-top-queue {
  display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
  border-bottom: 1px solid var(--bh-line);
  padding-bottom: 0.5rem;
}
.bh-top-queue { flex-direction: column; align-items: flex-start; gap: 0.15rem; }
.bh-h1 { font-size: 1rem; font-weight: 700; }
.bh-counts { font-size: 0.8rem; color: var(--bh-muted); }
.bh-navlink {
  font-size: 0.7rem; font-weight: 600;
  color: var(--bh-green); background: var(--bh-green-bg);
  border: 1px solid var(--bh-line); border-radius: 8px;
  padding: 0.25rem 0.5rem; white-space: nowrap;
}
.bh-group-label {
  margin: 0.3rem 0 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bh-muted);
}
.bh-card {
  background: var(--bh-card);
  border: 1px solid var(--bh-line);
  border-radius: 12px;
  padding: 0.85rem;
}
.bh-card-sm { padding: 0.7rem; }
.bh-frame .bh-card { margin: 0; }
.bh-row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; }
.bh-desc { font-weight: 600; }
.bh-amount { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.bh-meta { font-size: 0.78rem; color: var(--bh-muted); margin-top: 0.15rem; }
.bh-raw { color: var(--bh-muted); }
.bh-reasoning { margin: 0.6rem 0; font-size: 0.85rem; color: #2c333b; }
.bh-badge {
  display: inline-block;
  font-size: 0.7rem; font-weight: 600;
  padding: 0.1rem 0.5rem; border-radius: 999px;
  white-space: nowrap;
}
.bh-badge-green { color: var(--bh-green); background: var(--bh-green-bg); }
.bh-badge-amber { color: var(--bh-amber); background: var(--bh-amber-bg); }
.bh-splits {
  margin: 0.5rem 0;
  padding: 0.5rem 0.6rem;
  background: #fafbfc;
  border: 1px solid var(--bh-line);
  border-radius: 8px;
  font-size: 0.82rem;
}
.bh-split-line { display: flex; justify-content: space-between; gap: 0.5rem; }
.bh-split-line + .bh-split-line { margin-top: 0.25rem; }
.bh-split-line > span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.bh-ico { color: var(--bh-muted); }
.bh-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.7rem; }
.bh-btn {
  flex: 1 1 auto;
  text-align: center;
  font-size: 0.82rem; font-weight: 600;
  border: 1px solid var(--bh-line);
  border-radius: 9px;
  padding: 0.5rem 0.7rem;
  background: #fff;
  color: var(--bh-ink);
  white-space: nowrap;
}
.bh-approve { background: var(--bh-green); border-color: var(--bh-green); color: #fff; }
.bh-reject { color: var(--bh-red); border-color: #eccbc8; flex-grow: 0; }
.bh-input {
  display: block;
  margin-top: 0.5rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--bh-line);
  border-radius: 9px;
  background: #fff;
  color: var(--bh-muted);
  font-size: 0.82rem;
}
.bh-field, .bh-file-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.bh-label { font-size: 0.82rem; }
.bh-select {
  border: 1px solid var(--bh-line); border-radius: 9px;
  background: #fff; padding: 0.45rem 0.6rem; font-size: 0.82rem;
}
.bh-file { font-size: 0.82rem; }
.bh-hint { font-size: 0.75rem; color: var(--bh-muted); }
.bh-phone .bh-approve { align-self: flex-start; flex: 0 1 auto; padding: 0.5rem 1.1rem; }
.bh-status { margin: 0; font-size: 0.88rem; color: var(--bh-green); font-weight: 600; }

/* ---------- month certificate: a paper report, not an app screen ---------- */
.cert-doc {
  background: #fffdf8;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--ink);
  border-radius: 3px;
  box-shadow: 0 8px 24px rgba(35, 35, 31, 0.12);
  padding: 1.4rem 1.5rem 1.2rem;
  max-width: 26rem;
  font-size: 0.85rem;
  line-height: 1.5;
}
.cert-doc p { margin: 0; }
.cert-head { border-bottom: 1px solid var(--ink); padding-bottom: 0.7rem; margin-bottom: 0.8rem; }
.cert-title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.cert-sub { color: var(--ink-soft); font-size: 0.8rem; margin-top: 0.15rem; }
.cert-status {
  display: inline-block;
  margin-top: 0.55rem;
  padding: 0.1rem 0.55rem;
  border: 1.5px solid var(--amber);
  border-radius: 3px;
  color: var(--amber);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transform: rotate(-1deg);
}
.cert-lines { display: flex; flex-direction: column; gap: 0.35rem; }
.cert-line {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}
.cert-line > span:last-child {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cert-dots { flex: 1; border-bottom: 1px dotted var(--ink-soft); transform: translateY(-0.25em); min-width: 1.5rem; }
.cert-tie { margin-top: 0.8rem; font-weight: 600; color: var(--green); }
.cert-held { margin-top: 0.4rem; font-size: 0.78rem; color: var(--amber); }
.cert-foot {
  display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; flex-wrap: wrap;
  margin-top: 0.9rem;
  padding-top: 0.7rem;
  border-top: 1px dashed var(--ink-soft);
  font-size: 0.8rem;
}
.cert-sign { font-family: var(--font-display); font-style: italic; }
.cert-hash { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink-soft); font-size: 0.72rem; }

/* ---------- done list / two columns ---------- */
.donelist { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.donelist li { padding: 0.35rem 0; border-bottom: 1px solid var(--rule); }
.donelist s { color: var(--ink-soft); text-decoration-color: var(--green); text-decoration-thickness: 2px; }
.donelist .note { font-size: 0.9em; color: var(--green); }

.two-col { display: grid; gap: 1rem; margin-top: 0.5rem; }
@media (min-width: 40rem) { .two-col { grid-template-columns: 1fr 1fr; } }
.col-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.25rem 1.4rem;
}
.col-card:first-child { border-top: 4px solid var(--ink); }
.col-card:last-child { border-top: 4px solid var(--green); }
.col-card ul { margin: 0; padding-left: 1.1rem; }
.col-card li { margin: 0.4rem 0; }

/* ---------- bands (who / setup / faq / contact) ---------- */
.band { padding: 3.5rem 1.25rem; }
.band > h2, .band > p, .band > .cards, .band > .steps, .band > .faq,
.band > form, .band > .form-success { max-width: var(--max); margin-left: auto; margin-right: auto; }
.band-alt { background: var(--paper-2); }
.band h2 { margin-bottom: 1.5rem; }

.cards { display: grid; gap: 1rem; }
@media (min-width: 46rem) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.4rem;
}

.steps { list-style: none; counter-reset: step; padding: 0; max-width: 44rem !important; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.4rem 3.4rem;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -0.15rem;
  width: 2.3rem; height: 2.3rem;
  border-radius: 999px;
  background: var(--green); color: #fff;
  font-family: var(--font-display); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute; left: 1.1rem; top: 2.4rem; bottom: 0.2rem;
  width: 2px; background: var(--rule);
}

.faq { max-width: 44rem !important; }
.faq details {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  margin-bottom: 0.6rem;
  padding: 0 1.2rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.9rem 0;
  list-style-position: outside;
}
.faq details[open] summary { border-bottom: 1px solid var(--rule); }
.faq details p { padding: 0.9rem 0; margin: 0; color: var(--ink-soft); }

/* ---------- contact form ---------- */
.contact-sub { color: var(--ink-soft); max-width: var(--max); margin: -0.5rem auto 1.75rem; }
form { display: grid; gap: 1rem; max-width: 44rem !important; }
@media (min-width: 40rem) {
  form { grid-template-columns: 1fr 1fr; }
  .field-wide { grid-column: 1 / -1; }
}
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.3rem; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  border-color: var(--green);
}
.field.invalid input, .field.invalid textarea { border-color: var(--red); }
.field-err { display: none; color: var(--red); font-size: 0.85rem; margin: 0.3rem 0 0; }
.field.invalid .field-err { display: block; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.form-status { margin: 0.5rem 0 0; font-size: 0.95rem; color: var(--red); }
.form-status.sending { color: var(--ink-soft); }
.form-success {
  background: var(--green-soft);
  border: 1px solid var(--green);
  border-radius: 10px;
  padding: 1.75rem;
  max-width: 44rem !important;
}
.form-success h3 { color: var(--green); }

/* ---------- footer ---------- */
.footer {
  border-top: 2px solid var(--rule);
  padding: 2.5rem 1.25rem 6rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.footer p { margin: 0.25rem 0; }
.footer a { color: var(--ink-soft); }
.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.footer-brand img { width: 1.4rem; height: 1.4rem; opacity: 0.85; }

/* ---------- sticky CTA ---------- */
.sticky-cta {
  position: fixed;
  right: 1rem; bottom: 1rem;
  z-index: 50;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(35, 35, 31, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.5rem);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
body.show-sticky .sticky-cta { opacity: 1; pointer-events: auto; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .sticky-cta { transition: none; }
}

/* ---------- reveal animation (JS + motion-ok only; content visible by default) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(1.25rem);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .js .reveal.in-view { opacity: 1; transform: none; }
}
