:root {
  --ink: #10233b;
  --ink-soft: #4c6178;
  --paper: #faf6ec;
  --paper-line: #dcd3be;
  --stamp: #b23b2e;
  --gold: #c79a3d;
  --white: #ffffff;

  --display: "Fraunces", serif;
  --body: "IBM Plex Sans", sans-serif;
  --mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

a { color: inherit; }

/* -------- top rule (ledger page edge) -------- */
.ledger-rule {
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 24px, transparent 24px 40px);
  opacity: 0.55;
}

/* -------- nav -------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 6vw 0;
  max-width: 1200px;
  margin: 0 auto;
}
.wordmark {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.wordmark.small { font-size: 1.15rem; }
.wordmark-dot { color: var(--stamp); }
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  text-decoration: none;
  color: var(--paper);
  opacity: 0.75;
  font-size: 0.92rem;
}
.nav-links a:hover { opacity: 1; }
.nav-cta {
  text-decoration: none;
  border: 1px solid rgba(250,246,236,0.35);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  transition: border-color 0.15s, background 0.15s;
}
.nav-cta:hover { border-color: var(--gold); background: rgba(199,154,61,0.1); }

/* -------- hero -------- */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6vw 6vw 5vw;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 5vw;
  align-items: center;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
}
h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  font-weight: 500;
  line-height: 1.08;
  margin: 0 0 22px;
  letter-spacing: -0.01em;
}
.hero-sub {
  font-size: 1.05rem;
  color: rgba(250,246,236,0.78);
  max-width: 46ch;
  margin: 0 0 34px;
}

.trial-form {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin-bottom: 12px;
}
.trial-form input {
  flex: 1;
  background: rgba(250,246,236,0.06);
  border: 1px solid rgba(250,246,236,0.28);
  border-radius: 8px;
  padding: 13px 16px;
  color: var(--paper);
  font-family: var(--body);
  font-size: 0.95rem;
}
.trial-form input::placeholder { color: rgba(250,246,236,0.45); }
.trial-form input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}
.trial-form button {
  background: var(--stamp);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 13px 22px;
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.trial-form button:hover { background: #99311f; }
.trial-form button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.trial-form button:disabled { opacity: 0.6; cursor: default; }

.trial-note {
  font-size: 0.82rem;
  color: rgba(250,246,236,0.5);
  margin: 0;
}
.trial-note.error { color: #e3a08f; }

.trial-result {
  margin-top: 26px;
  background: rgba(250,246,236,0.06);
  border: 1px solid rgba(199,154,61,0.4);
  border-radius: 10px;
  padding: 20px 22px;
  max-width: 460px;
}
.trial-result-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 8px;
}
.trial-result code {
  display: block;
  font-family: var(--mono);
  font-size: 0.92rem;
  word-break: break-all;
  margin-bottom: 10px;
}
.trial-result-hint {
  font-size: 0.82rem;
  color: rgba(250,246,236,0.6);
  margin: 0 0 16px;
}
.btn-secondary {
  display: inline-block;
  text-decoration: none;
  border: 1px solid rgba(250,246,236,0.35);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
}
.btn-secondary:hover { border-color: var(--gold); }

/* -------- hero art: receipt + ledger -------- */
.hero-art {
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: center;
}
.receipt {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  width: min(340px, 100%);
  padding: 22px 22px 26px;
  border-radius: 4px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.55);
  transform: rotate(-1.2deg);
}
.receipt-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  border-bottom: 1px dashed var(--paper-line);
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.receipt-line, .receipt-total {
  display: flex;
  justify-content: space-between;
  font-size: 0.86rem;
  padding: 5px 0;
}
.receipt-total {
  border-top: 1px solid var(--ink);
  margin-top: 6px;
  padding-top: 9px;
  font-weight: 600;
}
.mono { font-family: var(--mono); }

.box {
  position: relative;
  outline: 1.5px solid transparent;
  border-radius: 3px;
  transition: outline-color 0.25s ease, background 0.25s ease;
}
.receipt.scanned .b1 { outline-color: var(--stamp); background: rgba(178,59,46,0.06); transition-delay: 0.1s; }
.receipt.scanned .b2 { outline-color: var(--stamp); background: rgba(178,59,46,0.06); transition-delay: 0.28s; }
.receipt.scanned .b3 { outline-color: var(--stamp); background: rgba(178,59,46,0.06); transition-delay: 0.46s; }
.receipt.scanned .b4 { outline-color: var(--gold); background: rgba(199,154,61,0.08); transition-delay: 0.64s; }

.stamp {
  position: absolute;
  bottom: -14px;
  right: -10px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  color: var(--stamp);
  border: 3px solid var(--stamp);
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(250,246,236,0.94);
  transform: rotate(-12deg) scale(1.5);
  opacity: 0;
  transition: opacity 0.35s ease 0.85s, transform 0.35s cubic-bezier(.2,1.4,.5,1) 0.85s;
  pointer-events: none;
}
.receipt.scanned .stamp {
  opacity: 0.94;
  transform: rotate(-12deg) scale(1);
}

.ledger-out {
  width: min(340px, 100%);
  background: rgba(250,246,236,0.05);
  border: 1px solid rgba(250,246,236,0.2);
  border-radius: 4px;
  padding: 14px 18px;
  font-size: 0.82rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease 1.15s, transform 0.4s ease 1.15s;
}
.receipt.scanned ~ .ledger-out { opacity: 1; transform: translateY(0); }
.ledger-out-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  padding: 5px 0;
  color: rgba(250,246,236,0.85);
}
.ledger-out-row.head {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
  border-bottom: 1px dashed rgba(250,246,236,0.2);
  padding-bottom: 8px;
  margin-bottom: 4px;
}
.ledger-out-row.status {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--gold);
  padding-top: 8px;
}

/* -------- ledger strip -------- */
.ledger-strip {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4vw 6vw;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  border-top: 1px dashed var(--paper-line);
  border-bottom: 1px dashed var(--paper-line);
}
.ledger-strip-row { display: flex; flex-direction: column; gap: 8px; }
.ledger-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gold);
}
.ledger-strip-row p {
  margin: 0;
  font-size: 0.94rem;
  color: rgba(250,246,236,0.78);
}

/* -------- how it works -------- */
.how {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6vw 6vw;
}
.how h2 {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 500;
  margin: 0 0 40px;
}
.how-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.how-steps li { display: flex; flex-direction: column; gap: 10px; }
.how-num {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--gold);
  border: 1px solid var(--gold);
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.how-steps h3 {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 500;
  margin: 0;
}
.how-steps p {
  margin: 0;
  font-size: 0.92rem;
  color: rgba(250,246,236,0.72);
}

/* -------- features -------- */
.features {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2vw 6vw 6vw;
}
.features h2 {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 500;
  margin: 0 0 40px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.feature-card {
  border: 1px solid var(--paper-line);
  border-radius: 10px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(250,246,236,0.03);
}
.feature-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}
.feature-card h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 500;
  margin: 0;
}
.feature-card p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(250,246,236,0.72);
}
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .features-grid { grid-template-columns: 1fr; }
}

/* -------- pricing -------- */
.pricing {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2vw 6vw 7vw;
}
.pricing-intro {
  text-align: center;
  margin-bottom: 40px;
}
.pricing-intro .eyebrow { color: var(--stamp); }
.pricing-intro h2 { margin: 8px 0 0; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 280px));
  gap: 22px;
  justify-content: center;
}
@media (max-width: 980px) {
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 340px)); max-width: 720px; margin: 0 auto; }
}
@media (max-width: 560px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
}
.pricing-card {
  background: var(--paper);
  color: var(--ink);
  border-radius: 10px;
  padding: 34px 30px;
  width: 100%;
  box-shadow: 0 30px 70px -30px rgba(0,0,0,0.5);
}
.pricing-card.featured {
  box-shadow: 0 30px 70px -25px rgba(0,0,0,0.6), 0 0 0 2px var(--stamp);
}
.pricing-card .eyebrow { color: var(--stamp); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tier-badge {
  background: rgba(0,0,0,0.06);
  color: var(--ink-soft);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 3px 9px;
  border-radius: 100px;
  text-transform: none;
}
.save-badge {
  background: var(--stamp);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 3px 9px;
  border-radius: 100px;
  text-transform: none;
}
.price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.price-amount { font-size: 2.6rem; font-weight: 500; }
.price-period { color: var(--ink-soft); font-size: 0.95rem; }
.price-equiv {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 0 0 22px;
}
.price-list {
  list-style: none;
  padding: 0;
  margin: 0 0 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.price-list li {
  font-size: 0.92rem;
  padding-left: 22px;
  position: relative;
}
.price-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--stamp);
}
.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}
.subscribe-form input {
  background: rgba(30,26,20,0.04);
  border: 1px solid rgba(30,26,20,0.18);
  border-radius: 8px;
  padding: 13px 16px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 0.95rem;
}
.subscribe-form input::placeholder { color: rgba(30,26,20,0.4); }
.subscribe-form input:focus-visible {
  outline: 2px solid var(--stamp);
  outline-offset: 1px;
}
.subscribe-note {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 0;
}
.subscribe-note a { color: var(--stamp); }
.subscribe-note.error { color: #b3402b; }
.btn-primary {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  background: var(--stamp);
  color: var(--white);
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover { background: #99311f; }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.price-footnote {
  font-size: 0.8rem;
  color: rgba(250,246,236,0.6);
  text-align: center;
  margin: 36px auto 0;
  max-width: 560px;
}
.price-footnote a { color: var(--gold); }

/* -------- footer -------- */
.site-footer { padding: 0 6vw 40px; max-width: 1200px; margin: 0 auto; }
.footer-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 22px;
  flex-wrap: wrap;
}
.footer-row p {
  font-size: 0.85rem;
  color: rgba(250,246,236,0.55);
  margin: 0;
}

/* -------- light "paper" theme for legal/about pages -------- */
body.legal { background: var(--paper); color: var(--ink); }
body.legal .nav-links a { color: var(--ink); opacity: 0.65; }
body.legal .nav-links a:hover { opacity: 1; }
body.legal .nav-cta { border-color: rgba(16,35,59,0.3); }
body.legal .nav-cta:hover { border-color: var(--stamp); background: rgba(178,59,46,0.06); }
body.legal .wordmark { color: var(--ink); }
body.legal .site-footer .footer-row p { color: rgba(16,35,59,0.55); }
body.legal .ledger-rule { opacity: 0.7; }

.legal-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 4vw 6vw 8vw;
}
.legal-main .eyebrow { color: var(--stamp); }
.legal-main h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 3.4vw, 2.6rem);
  font-weight: 500;
  margin: 0 0 8px;
}
.legal-updated {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 0 0 42px;
}
.legal-main h2 {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 500;
  margin: 40px 0 12px;
}
.legal-main h2:first-of-type { margin-top: 0; }
.legal-main p, .legal-main li {
  font-size: 0.97rem;
  color: rgba(16,35,59,0.82);
}
.legal-main ul { padding-left: 20px; }
.legal-main li { margin-bottom: 8px; }
.legal-main a.inline-link { color: var(--stamp); text-decoration: underline; }
.legal-placeholder {
  background: rgba(178,59,46,0.08);
  border: 1px dashed var(--stamp);
  border-radius: 6px;
  padding: 2px 6px;
  font-family: var(--mono);
  font-size: 0.85em;
}
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; margin-left: auto; }
.footer-links a {
  font-size: 0.85rem;
  text-decoration: none;
  color: inherit;
  opacity: 0.6;
}
.footer-links a:hover { opacity: 1; }
@media (max-width: 860px) {
  .footer-links { margin-left: 0; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 10vw; }
  .hero-art { margin-top: 10px; }
  .ledger-strip, .how-steps { grid-template-columns: 1fr; }
  .trial-form { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
