/* SabiLedger public website (site/*.html). The app's own indigo and sun,
   a receipt that prints in the hero, and the feature list written like
   ledger lines. Light only: the hero carries the colour. */
:root {
  --indigo: #2B2A8C;
  --indigo-deep: #1F1E6B;
  --indigo-ink: #16154F;
  --sun: #F4B23E;
  --sun-soft: #FFF1D6;
  --sage: #EEF1EA;
  --sage-line: #DCE1D5;
  --paper: #FFFFFF;
  --ink: #1A1F16;
  --muted: #4F5848;
  --paid: #1D6B3F;
  --owed: #A8261A;
  --display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --body: 'Figtree', 'Noto Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', 'Noto Sans', ui-monospace, Menlo, monospace;
  --wrap: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sage); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.6; }
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--sun); color: var(--ink); padding: 10px 14px; border-radius: 10px; font-weight: 700; z-index: 10; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font: 700 16px/1.2 var(--body); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, background .15s ease, color .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.btn-sun { background: var(--sun); color: var(--indigo-ink); }
.btn-sun:hover { background: #F7C25F; }
.btn-ghost { color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn-ink { background: var(--indigo-ink); color: #fff; }
.btn-ink:hover { background: var(--indigo); }
.text-link { font-weight: 700; color: var(--indigo); text-decoration: none; border-bottom: 2px solid var(--sun); padding-bottom: 1px; }
.text-link:hover { border-bottom-color: var(--indigo); }

/* Nav */
.nav { background: var(--indigo); color: #fff; position: sticky; top: 0; z-index: 5; }
.nav-row { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 20px/1 var(--display); text-decoration: none; letter-spacing: -0.02em; }
.brand-mark svg { width: 30px; height: 30px; }
.brand-mark rect { fill: var(--sun); }
.brand-mark path { fill: none; stroke: var(--indigo-ink); stroke-width: 2.6; stroke-linecap: round; }
.nav-links { display: flex; align-items: center; gap: 26px; font-weight: 600; font-size: 15px; }
.nav-links a:not(.btn) { text-decoration: none; opacity: .88; }
.nav-links a:not(.btn):hover { opacity: 1; text-decoration: underline; text-decoration-color: var(--sun); text-underline-offset: 5px; text-decoration-thickness: 2px; }
.nav-toggle { display: none; background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.5); border-radius: 999px; padding: 8px 16px; font: 700 15px var(--body); cursor: pointer; }

/* Hero */
.hero { background: var(--indigo); color: #fff; overflow: hidden; padding: 48px 0 0; }
.hero-row { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: end; }
.hero-copy { padding-bottom: 72px; }
.eyebrow { font: 600 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--sun); margin-bottom: 22px; }
.hero h1 { font-size: clamp(56px, 9vw, 112px); font-weight: 800; line-height: .92; letter-spacing: -0.045em; }
.lede { font-size: 20px; line-height: 1.5; max-width: 30em; margin-top: 26px; color: #E4E3FA; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { margin-top: 16px; font-size: 14px; color: #BEBCF0; }

/* The receipt: a thermal printer's slot, and the slip that comes out of it */
.printer { position: relative; align-self: stretch; display: flex; flex-direction: column; align-items: center; padding-top: 8px; }
.printer-slot { width: min(380px, 100%); height: 16px; border-radius: 10px; background: var(--indigo-ink); box-shadow: inset 0 3px 6px rgba(0,0,0,.45); position: relative; z-index: 2; }
.receipt-clip { width: min(352px, 92%); overflow: hidden; margin-top: -8px; flex: 1; }
.receipt { background: var(--paper); color: var(--ink); font-family: var(--mono); font-size: 13px; line-height: 1.5; padding: 28px 22px 34px;
  box-shadow: 0 18px 40px rgba(10, 9, 60, .35); animation: print 2.4s cubic-bezier(.3,.1,.2,1) .3s both;
  /* a torn bottom edge */
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat, radial-gradient(circle at 8px 0, #000 7px, transparent 7.5px) bottom / 16px 10px repeat-x;
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat, radial-gradient(circle at 8px 0, #000 7px, transparent 7.5px) bottom / 16px 10px repeat-x; }
@keyframes print {
  0% { transform: translateY(-100%); }
  70% { transform: translateY(-4%); }
  100% { transform: translateY(0); }
}
.r-head { text-align: center; display: grid; gap: 2px; }
.r-head b { font-size: 15px; letter-spacing: .06em; }
.r-head span, .r-meta { color: var(--muted); font-size: 12px; }
.r-meta { display: flex; justify-content: space-between; margin-top: 14px; }
.r-rule { border-top: 2px dashed var(--sage-line); margin: 12px 0; }
.r-line { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; }
.r-line span:nth-child(2) { grid-column: 1; grid-row: 2; color: var(--muted); font-size: 12px; }
.r-line b { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 500; }
.r-line + .r-line { margin-top: 8px; }
.r-total, .r-sub { display: flex; justify-content: space-between; }
.r-total { font-size: 16px; font-weight: 600; }
.r-total b { font-weight: 600; }
.r-sub { margin-top: 4px; color: var(--paid); }
.r-sub b { font-weight: 500; }
.r-owed { color: var(--owed); }
.r-done { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 12px; }
.r-done li { display: flex; gap: 8px; align-items: baseline; }
.r-done li::before { content: ''; width: 9px; height: 5px; border-left: 2px solid var(--paid); border-bottom: 2px solid var(--paid); transform: rotate(-45deg) translateY(-2px); flex: none; }

/* Sections */
section { scroll-margin-top: 80px; }
.who, .what, .demos, .faq { padding: 96px 0; }
h2 { font-size: clamp(32px, 4.4vw, 48px); font-weight: 800; line-height: 1.05; }
.section-lede { font-size: 19px; color: var(--muted); margin-top: 12px; max-width: 36em; }
.tag { font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--indigo); }

.who-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.who-card { background: var(--paper); border: 1px solid var(--sage-line); border-radius: 22px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.who-card h3 { font-size: 23px; line-height: 1.2; font-weight: 700; }
.who-card p:not(.tag) { color: var(--muted); font-size: 16px; flex: 1; }
.who-card .text-link { align-self: flex-start; }

/* What it does: ledger lines with dotted leaders */
.what { background: var(--paper); }
.ledger { margin: 44px 0 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 56px; }
.ledger-row { display: grid; grid-template-columns: auto 1fr; align-items: baseline; align-content: start; padding: 16px 0; border-bottom: 1px solid var(--sage-line); }
.ledger-row dt { font-weight: 700; font-size: 17px; display: flex; align-items: baseline; gap: 10px; grid-column: 1 / -1; }
.ledger-row dt::after { content: ''; flex: 1; border-bottom: 2px dotted #B9C0B0; transform: translateY(-4px); min-width: 24px; }
.ledger-row dd { margin: 4px 0 0; color: var(--muted); font-size: 15.5px; grid-column: 1 / -1; }
.safe { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.safe li { background: var(--sage); border-radius: 16px; padding: 18px; font-size: 15px; color: var(--muted); }
.safe b { display: block; color: var(--ink); margin-bottom: 4px; }

/* Demos */
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 44px; }
.demo-card { display: grid; gap: 10px; text-decoration: none; background: var(--indigo); color: #fff; border-radius: 24px; padding: 32px; position: relative; overflow: hidden; transition: transform .15s ease, background .15s ease; }
.demo-card:hover { transform: translateY(-2px); background: var(--indigo-deep); }
.demo-card .tag { color: var(--sun); }
.demo-name { font: 800 32px/1.05 var(--display); letter-spacing: -0.03em; }
.demo-about { color: #D9D8F6; font-size: 16px; max-width: 26em; }
.demo-go { margin-top: 10px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.demo-go::after { content: ''; width: 9px; height: 9px; border-top: 2.5px solid var(--sun); border-right: 2.5px solid var(--sun); transform: rotate(45deg); transition: transform .15s ease; }
.demo-card:hover .demo-go::after { transform: translateX(3px) rotate(45deg); }

/* Pricing */
.pricing { background: var(--sun); padding: 64px 0; }
.pricing-row { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.pricing h2 { color: var(--indigo-ink); }
.pricing p { font-size: 18px; margin-top: 12px; max-width: 34em; color: #3D2A00; }
.pricing .btn { flex: none; }

/* FAQ */
.faq details { max-width: 820px; }
.faq h2 { margin-bottom: 28px; }
.faq details { border-bottom: 1px solid var(--sage-line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font-weight: 700; font-size: 18px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 6px; top: 14px; font: 600 26px/1 var(--mono); color: var(--indigo); }
.faq details[open] summary::after { content: '-'; }
.faq details p { padding: 0 0 22px; color: var(--muted); max-width: 40em; }
.faq a { color: var(--indigo); font-weight: 600; }

/* Footer */
.foot { background: var(--indigo-ink); color: #fff; padding: 48px 0 28px; }
.foot-row { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot-note { color: #BEBCF0; margin-top: 10px; font-size: 15px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 12px 26px; font-weight: 600; font-size: 15px; }
.foot-links a { text-decoration: none; opacity: .9; }
.foot-links a:hover { opacity: 1; text-decoration: underline; text-decoration-color: var(--sun); text-underline-offset: 4px; }
.foot-copy { margin-top: 36px; color: #9896D6; font-size: 13px; }

/* Terms and Privacy */
.doc-head { background: var(--indigo); color: #fff; padding: 56px 0 48px; }
.doc-head h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.doc-head p { color: #D9D8F6; margin-top: 14px; }
.doc { padding: 56px 0 96px; }
.doc-body { max-width: 760px; background: var(--paper); border-radius: 24px; padding: 40px 44px; border: 1px solid var(--sage-line); }
.doc-body h2 { font-size: 24px; margin: 36px 0 10px; letter-spacing: -0.02em; }
.doc-body h2:first-child { margin-top: 0; }
.doc-body p, .doc-body li { color: #2E3528; font-size: 16.5px; }
.doc-body p + p { margin-top: 12px; }
.doc-body ul { padding-left: 22px; margin: 10px 0; }
.doc-body li + li { margin-top: 6px; }
.doc-body a { color: var(--indigo); font-weight: 600; }
.doc-note { background: var(--sun-soft); border-radius: 14px; padding: 14px 16px; font-size: 15px !important; }

/* Smaller screens */
@media (max-width: 960px) {
  .hero-row { grid-template-columns: 1fr; gap: 8px; }
  .hero-copy { padding-bottom: 32px; }
  .printer { max-height: 430px; }
  .who-grid, .demo-grid { grid-template-columns: 1fr; }
  .ledger { grid-template-columns: 1fr; }
  .safe { grid-template-columns: 1fr 1fr; }
  .pricing-row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav-toggle { display: inline-block; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 68px; background: var(--indigo); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 18px; box-shadow: 0 12px 24px rgba(0,0,0,.2); }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .nav-links .btn { margin-top: 14px; }
  /* Terms and Privacy have only two links: no menu needed. */
  .nav-links.nav-links-doc { display: flex; position: static; flex-direction: row; gap: 18px; padding: 0; box-shadow: none; background: none; }
  .nav-links.nav-links-doc a:not(.btn) { padding: 0; border: 0; }
  .hero { padding-top: 36px; }
  .lede { font-size: 18px; }
  .cta-row .btn { width: 100%; }
  .who, .what, .demos, .faq { padding: 64px 0; }
  .safe { grid-template-columns: 1fr; }
  .doc-body { padding: 26px 20px; border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .receipt { animation: none; }
  .btn, .demo-card { transition: none; }
}
