@font-face { font-family: 'Ubuntu'; src: url(fonts/ubuntu-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Ubuntu'; src: url(fonts/ubuntu-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Ubuntu'; src: url(fonts/ubuntu-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Sometype Mono'; src: url(fonts/sometype-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --ink: #16181D;
  --red: #E0362C;
  --red-deep: #B8261E;
  --btn: #C8281E;
  --paper: #F6F3EE;
  --carbon: #2E4A8B;
  --rule: rgba(22, 24, 29, .55);
  --band: #E7E1D7;
  --sans: 'Ubuntu', system-ui, sans-serif;
  --type: 'Sometype Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { background: var(--paper) url(paper-tile.png) 0 0 / 627px repeat; color: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 18px; line-height: 1.5; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 3px solid var(--carbon); outline-offset: 3px; border-radius: 2px; }
a { color: inherit; text-underline-offset: .2em; }
html { scrollbar-color: var(--ink) var(--band); }

/* ---------- sections ---------- */
.wrap { width: min(1236px, 100% - 48px); margin-inline: auto; }
.sec { padding: 96px 0; border-top: 1.5px solid var(--rule); }
.sec h2 { font-size: clamp(30px, 3.2vw, 46px); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 16px; text-wrap: balance; }
.sec h3 { font-size: 22px; margin: 0 0 6px; }
.lead { font-size: 20px; max-width: 62ch; margin: 0 0 40px; }
.typed { font-family: var(--type); font-size: 17px; margin: 10px 0 0; }
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
.split p { max-width: 62ch; }

.steps { list-style: none; padding: 0; margin: 0; border: 1.5px solid var(--rule); }
.steps li { display: grid; grid-template-columns: 72px 1fr; border-top: 1.5px solid var(--rule); }
.steps li:first-child { border-top: 0; }
.steps .no { display: grid; place-items: center; font-weight: 700; font-size: 26px; border-right: 1.5px solid var(--rule); background: var(--band); }
.steps li > div { padding: 22px 28px; }
.steps p { margin: 0; max-width: 88ch; }

.ledger { width: 100%; border-collapse: collapse; border: 1.5px solid var(--rule); font-size: 18px; }
.ledger th, .ledger td { border: 1.5px solid var(--rule); padding: 16px 20px; text-align: left; vertical-align: top; }
.ledger thead th { background: var(--band); font-size: 15px; letter-spacing: .06em; text-transform: uppercase; }
.ledger tbody th { font-weight: 700; width: 28%; }
.ledger tbody th a { text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.ledger .num { font-family: var(--type); white-space: nowrap; text-align: right; width: 18%; font-variant-numeric: tabular-nums; }
.ledger tbody tr:first-child td.num { color: var(--red-deep); font-weight: 700; }

.notice { background: rgba(169, 195, 214, .28); }
.more { font-weight: 700; text-decoration-color: var(--red); text-decoration-thickness: 2px; }

.card-form { margin: 0; border: 1.5px solid var(--rule); }
.card-form > div { display: grid; grid-template-columns: 140px 1fr; border-top: 1.5px solid var(--rule); }
.card-form > div:first-child { border-top: 0; }
.card-form dt { padding: 14px 16px; font-weight: 700; font-size: 15px; border-right: 1.5px solid var(--rule); }
.card-form dd { margin: 0; padding: 14px 16px; font-family: var(--type); font-size: 16px; }
.maker { font-size: 15px; }

.order { position: relative; border: 1.5px solid var(--rule); max-width: 900px; background: var(--paper) url(paper-tile.png) 0 0 / 627px repeat; margin-bottom: 26px; }
.order .row { display: grid; grid-template-columns: 240px 1fr; border-top: 1.5px solid var(--rule); }
.order .row:first-child { border-top: 0; }
.order label, .order .lbl { padding: 18px 20px; font-weight: 700; font-size: 17px; border-right: 1.5px solid var(--rule); }
.order input, .order textarea { font: 20px/1.4 var(--type); color: var(--ink); background: transparent; border: 0; padding: 16px 20px; width: 100%; resize: vertical; caret-color: var(--red); }
.order input:focus, .order textarea:focus { outline: none; background: rgba(255, 255, 255, .45); }
.order textarea::placeholder { color: #6d6862; }
.order [aria-invalid="true"] { background: rgba(224, 54, 44, .08); }
.order .sign { align-items: center; }
.order .sign .btn { margin: 16px 20px; justify-self: start; }
.btn { background: var(--btn); color: #fff; border: 0; border-radius: 5px; padding: 18px 30px; font: 700 20px/1 var(--sans); cursor: pointer; box-shadow: 0 3px 10px rgba(150, 30, 20, .25); transition: background .2s; }
.btn:hover { background: var(--red-deep); }
.btn[disabled] { opacity: .6; cursor: progress; }
.status { margin: 0; padding: 0 20px; font-family: var(--type); }
.status:not(:empty) { padding: 14px 20px; border-top: 1.5px solid var(--rule); }
.status.err { color: var(--red-deep); }
.hp { position: absolute; left: -9999px; }

details { border-top: 1.5px solid var(--rule); padding: 18px 0; }
details:last-child { border-bottom: 1.5px solid var(--rule); }
summary { font-weight: 700; font-size: 20px; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: ""; display: inline-block; width: 14px; height: 14px; margin: 0 14px -1px 0; background: linear-gradient(var(--red), var(--red)) center / 14px 2.5px no-repeat, linear-gradient(var(--red), var(--red)) center / 2.5px 14px no-repeat; }
details[open] summary::before { background: linear-gradient(var(--red), var(--red)) center / 14px 2.5px no-repeat; }
details p { margin: 10px 0 0 28px; max-width: 70ch; }

.foot-sec { padding: 56px 0 72px; border-top: 2px solid var(--ink); font-size: 16px; }
.foot-logo { height: 40px; width: auto; }


/* ---------- narrow screens: the form stacks ---------- */
@media (max-width: 960px) {
  .sec { padding: 64px 0; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .lead { font-size: 18px; }
  .ledger, .ledger tbody, .ledger tr, .ledger th, .ledger td { display: block; width: auto !important; }
  .ledger thead { display: none; }
  .ledger tr { border-top: 1.5px solid var(--rule); padding: 12px 14px; }
  .ledger th, .ledger td { border: 0; padding: 2px 0; text-align: left !important; }
  .ledger .num { white-space: normal; font-size: 18px; margin-top: 4px; }
  .order .row { grid-template-columns: 1fr; }
  .order label, .order .lbl { border-right: 0; padding: 12px 16px 0; font-size: 15px; }
  .order input, .order textarea { font-size: 17px; padding: 8px 16px 14px; }
  .steps li { grid-template-columns: 52px 1fr; }
  .steps li > div { padding: 18px; }
  }

/* ---------- service pages ---------- */
.mast { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 0 14px; border-bottom: 2px solid var(--ink); }
.mast-logo img { height: 56px; width: auto; display: block; margin-left: -10px; }
.mast ul { display: flex; flex-wrap: wrap; gap: 6px 28px; list-style: none; margin: 0; padding: 0; }
.mast a { text-decoration: none; font-weight: 500; font-size: 18px; }
.mast a:hover, .mast a[aria-current] { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.doc { padding: 64px 0 80px; }
.doc h1 { font-size: clamp(34px, 4.4vw, 60px); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 18px; max-width: 22ch; text-wrap: balance; }
.card-form.wide { max-width: 900px; }
.card-form.wide > div { grid-template-columns: 200px 1fr; }
.doc-cta { margin: 32px 0 0; }
a.btn { display: inline-block; text-decoration: none; }
.sub .sec p { max-width: 70ch; }
.rel { padding: 0; list-style: none; margin: 0; max-width: 900px; }
.rel li { border-top: 1.5px solid var(--rule); padding: 14px 0; font-size: 19px; }
.rel li:last-child { border-bottom: 1.5px solid var(--rule); }
.rel a { text-decoration-color: var(--red); text-decoration-thickness: 2px; }
@media (max-width: 960px) {
  .mast { flex-direction: column; align-items: flex-start; gap: 6px; }
  .mast a { font-size: 16px; }
  .card-form.wide > div { grid-template-columns: 1fr; }
  .card-form.wide dt { border-right: 0; padding-bottom: 0; }
}


/* the person behind it */
.person { display: grid; grid-template-columns: 240px minmax(0, 1.3fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.person p { max-width: 62ch; }
.portrait { width: 100%; height: auto; display: block; border: 1.5px solid var(--rule); padding: 8px; background: #fff; }
@media (max-width: 1100px) { .person { grid-template-columns: 200px 1fr; } .person .card-form { grid-column: 1 / -1; } }
@media (max-width: 600px) { .person { grid-template-columns: 1fr; gap: 24px; } .portrait { width: 200px; } }

/* ---------- homepage hero: the same document style as the service pages ---------- */
.doc.home h1 { max-width: 20ch; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; max-width: 1236px; }
.demo dd input, .demo dd output { all: unset; display: block; width: 100%; font-family: var(--type); font-size: 17px; color: var(--ink); caret-color: var(--red); }
.demo dd input::placeholder { color: var(--ink); opacity: 1; }
.demo dd input:focus::placeholder { opacity: .35; }
.demo dd:has(input:focus) { background: rgba(255, 255, 255, .5); }
.svc-list { border: 1.5px solid var(--rule); }
.svc-list-h { margin: 0; padding: 12px 16px; background: var(--band); font-weight: 700; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; border-bottom: 1.5px solid var(--rule); }
.svc-list ol { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.svc-list li { counter-increment: s; border-top: 1.5px solid var(--rule); }
.svc-list li:first-child { border-top: 0; }
.svc-list a { display: grid; grid-template-columns: 44px 1fr; column-gap: 16px; align-items: center; min-height: 52px; text-decoration: none; font-size: 18px; }
.svc-list a::before { content: counter(s); font-weight: 700; text-align: center; align-self: stretch; display: grid; place-items: center; border-right: 1.5px solid var(--rule); }
.svc-list a:hover { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.svc-list a { padding-right: 12px; }
.where { margin-left: 22px; font-weight: 500; }
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .where { display: block; margin: 14px 0 0; }
}

/* ---------- use-case demos ---------- */
.tabs { display: flex; flex-wrap: wrap; border-bottom: 2px solid var(--ink); margin-bottom: 32px; }
.tabs button { font: 700 18px/1 var(--sans); color: var(--ink); background: none; border: 1.5px solid transparent; border-bottom: 0; padding: 14px 22px; cursor: pointer; margin-bottom: -2px; border-radius: 6px 6px 0 0; }
.tabs button[aria-selected="true"] { background: var(--paper); border-color: var(--ink); border-bottom: 2px solid var(--paper); }
.tabs button:not([aria-selected="true"]):hover { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.panel { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
.panel[hidden] { display: none; }
.panel-copy p { max-width: 52ch; }
.demo-box { position: relative; border: 1.5px solid var(--rule); background: #fbf9f6; min-height: 430px; box-shadow: 0 10px 30px -18px rgba(22, 24, 29, .35); }
.demo-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1.5px solid var(--rule); background: var(--band); font-weight: 700; font-size: 15px; }
.tag { font: 400 13px/1 var(--type); border: 1px solid var(--rule); padding: 4px 8px; border-radius: 3px; background: var(--paper); }
.replay { position: absolute; right: 14px; bottom: 12px; font: 500 14px/1 var(--sans); background: none; border: 0; color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: .25em; cursor: pointer; opacity: 0; transition: opacity .3s; }
.demo-box.done .replay { opacity: 1; }
.btn-mini { display: inline-block; margin: 10px 8px 0 0; padding: 8px 14px; border-radius: 5px; background: var(--btn); color: #fff; font: 700 14px/1 var(--sans); }
.btn-mini.ghost { background: none; color: var(--ink); border: 1.5px solid var(--rule); }
.out-h { margin: 0 0 8px; font-weight: 700; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }

/* reveal grammar: things appear by settling in, expo ease-out, from a visible default */
.js [data-demo] .step { opacity: 0; transform: translateY(8px); }
.js [data-demo] .step.on { opacity: 1; transform: none; transition: opacity .45s cubic-bezier(.16, 1, .3, 1), transform .45s cubic-bezier(.16, 1, .3, 1); }

/* chatbot */
.msgs { list-style: none; margin: 0; padding: 20px 18px 56px; display: flex; flex-direction: column; gap: 12px; }
.m { max-width: 80%; padding: 12px 14px; border-radius: 12px; font-size: 16px; line-height: 1.45; }
.m.user { align-self: flex-end; background: var(--ink); color: var(--paper); border-bottom-right-radius: 3px; }
.m.bot { align-self: flex-start; background: #fff; border: 1.5px solid var(--rule); border-bottom-left-radius: 3px; }
.src, .handoff { display: block; margin-top: 8px; font: 13px/1.3 var(--type); color: #4b4945; }
.handoff { color: var(--red-deep); font-weight: 700; }
.handoff::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 8px; vertical-align: 1px; }
.typing { position: absolute; left: 18px; bottom: 16px; display: none; gap: 5px; padding: 10px 12px; background: #fff; border: 1.5px solid var(--rule); border-radius: 12px; }
.typing.on { display: flex; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); opacity: .35; animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 30% { opacity: 1; transform: translateY(-3px); } }

/* invoice */
.inv { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 20px 18px 56px; }
.inv-doc { position: relative; overflow: hidden; background: #fff; border: 1.5px solid var(--rule); padding: 16px; font-size: 14.5px; line-height: 1.5; box-shadow: 2px 3px 0 -1px #e8e3da; }
.inv-doc p { margin: 0 0 6px; }
.inv-h { font-weight: 700; letter-spacing: .02em; border-bottom: 1.5px solid var(--rule); padding-bottom: 8px; margin-bottom: 10px !important; }
.inv-lines { color: #4b4945; border-top: 1px dashed var(--rule); border-bottom: 1px dashed var(--rule); padding: 6px 0; margin: 10px 0 !important; }
.inv-sum { font-weight: 700; }
.inv-doc b { font-weight: 700; border-radius: 3px; transition: background .3s, box-shadow .3s; }
.inv-doc b.hit { background: rgba(224, 54, 44, .14); box-shadow: 0 0 0 3px rgba(224, 54, 44, .14); }
.scan { position: absolute; left: 0; right: 0; top: -30%; height: 30%; background: linear-gradient(to bottom, transparent, rgba(46, 74, 139, .10) 70%, rgba(46, 74, 139, .45) 100%); pointer-events: none; opacity: 0; }
.scan.run { opacity: 1; animation: scan 2.4s cubic-bezier(.45, 0, .2, 1) forwards; }
@keyframes scan { to { top: 100%; } }
.inv-out dl { margin: 0; border: 1.5px solid var(--rule); background: #fff; }
.inv-out dl > div { display: grid; grid-template-columns: 110px 1fr; border-top: 1px solid var(--rule); }
.inv-out dl > div:first-child { border-top: 0; }
.inv-out dt { padding: 9px 10px; font-size: 13px; font-weight: 700; border-right: 1px solid var(--rule); }
.inv-out dd { margin: 0; padding: 9px 10px; font: 14px/1.4 var(--type); min-height: 1.4em; }
.ok { margin: 12px 0 0; font-weight: 700; color: #1f6b3a; }
.ok::before { content: ""; display: inline-block; width: 6px; height: 11px; border: solid #1f6b3a; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); margin: 0 10px 0 4px; vertical-align: 1px; }

/* e-mail triage */
.inbox { list-style: none; margin: 0; padding: 8px 0 0; }
.inbox li { display: grid; grid-template-columns: 150px 1fr auto; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--rule); font-size: 15px; }
.inbox span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox em { font: 700 12px/1 var(--sans); font-style: normal; letter-spacing: .03em; padding: 5px 8px; border-radius: 3px; transition: opacity .35s, transform .35s cubic-bezier(.16, 1, .3, 1); }
.js .inbox em { opacity: 0; transform: scale(.85); }
.js .inbox em.on { opacity: 1; transform: none; }
.lbl-o { background: #dde7f3; color: #1d3a6e; } .lbl-r { background: #f6dcd9; color: #8d1c15; } .lbl-c { background: #e3eedf; color: #285a1c; } .lbl-s { background: #e7e3dc; color: #5b5750; text-decoration: line-through; }
.inbox li.spam { opacity: .45; transition: opacity .4s; }
.demo-box.mail { padding-bottom: 36px; }
.draft { margin: 16px; padding: 14px 16px 16px; background: #fff; border: 1.5px solid var(--rule); }
.draft p { margin: 0; font-size: 15px; }
.draft p + p { font-family: var(--type); font-size: 14.5px; line-height: 1.5; }

@media (max-width: 960px) {
  .panel { grid-template-columns: 1fr; gap: 20px; }
  .tabs button { padding: 12px 14px; font-size: 16px; }
  .inv { grid-template-columns: 1fr; }
  .inbox li { grid-template-columns: 1fr auto; } .inbox b { grid-column: 1 / -1; }
  .m { max-width: 92%; }
}
.demo-sec .demo-box { max-width: 760px; }
@media (prefers-reduced-motion: reduce) { .js [data-demo] .step.on, .js .inbox em.on { transition: none; } }
