/* CashDB landing. The page is the trader's counter at close of day: paper objects on a dark desk, the phone that got the SMS, money in green and red. */
:root {
  --desk: #2e3440;
  --desk-2: #333a49;
  --ground: #3b4252;
  --paper: #eceff4;
  --paper-2: #e5e9f0;
  --rule: #d8dee9;
  --ink: #2e3440;
  --ink-2: #4c566a;
  --on-dark: #eceff4;
  --on-dark-2: #c9d0dc;
  --accent: #5e81ac;
  --accent-deep: #4c6e96;
  --frost: #88c0d0;
  --in: #467036;
  --out: #a3454e;

  --t-xl: clamp(2.5rem, 5.4vw, 4.75rem);
  --t-l: clamp(2.25rem, 4.4vw, 4rem);
  --t-m: clamp(1.375rem, 2vw, 1.875rem);
  --t-b: 1.0625rem;
  --t-s: 0.875rem;

  --m: clamp(16px, 3vw, 40px);
  --gap: clamp(120px, 14vw, 200px);
  --cond: "IBM Plex Sans Condensed", "IBM Plex Sans", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--desk); color: var(--on-dark);
  font: 400 var(--t-b)/1.55 "IBM Plex Sans", system-ui, sans-serif; font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--frost); color: var(--desk); }
:focus-visible { outline: 3px solid var(--frost); outline-offset: 3px; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.in { color: var(--in); } .out { color: var(--out); }
.section-title { font: 700 var(--t-xl)/0.95 var(--cond); letter-spacing: -0.02em; text-transform: uppercase; text-wrap: balance; }

/* an object on the desk: paper (or plastic) with one light source from above */
.obj {
  --r: 0deg; transform: rotate(var(--r));
  box-shadow: 0 24px 48px rgb(0 0 0 / 0.35); /* taste-skill-ignore: desk objects float over the counter, one shared light — the world's material */
}

/* ---------- hero: the counter — book, phone, tickets, CTA card */
.hero {
  position: relative; min-height: 100svh; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--m) * 2.5) var(--m) calc(var(--m) * 3);
}
.hero::before { /* the planks of the counter, whisper-quiet */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.45;
  background: repeating-linear-gradient(90deg, transparent 0 238px, var(--desk-2) 238px 240px); /* taste-skill-ignore: hard-stop plank lines of the counter, not a colour gradient */
}
.scene {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  column-gap: clamp(32px, 5vw, 96px); align-items: start; width: 100%;
}

.book {
  --r: -1.5deg; grid-column: 1; grid-row: 1; z-index: 1;
  background: var(--paper); color: var(--ink);
  padding: clamp(24px, 3vw, 46px) clamp(24px, 3vw, 46px) clamp(72px, 7vw, 96px);
}
.book h1 {
  font: 700 var(--t-l)/0.95 var(--cond); text-transform: uppercase; letter-spacing: -0.01em;
  margin: 0 0 18px; text-wrap: balance;
}
.lede { font-size: var(--t-b); line-height: 1.5; color: var(--ink); max-width: 36ch; }

/* the hero ledger is a real table: rules belong here */
.ledger { width: 100%; border-collapse: collapse; margin-top: 28px; border-top: 2px solid var(--ink); font-size: var(--t-b); }
.ledger caption {
  text-align: left; font-size: var(--t-s); font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink-2); padding: 12px 0;
}
.ledger td { padding: 11px 0; border-bottom: 1px solid var(--rule); }
.ledger td:first-child { overflow-wrap: anywhere; padding-right: 16px; }
.ledger .n { text-align: right; font-weight: 600; white-space: nowrap; }
.ledger .lbal td {
  border-bottom: 0; padding-top: 16px;
  font: 700 var(--t-m)/1 var(--cond);
}
.js .book .fresh { animation: fresh 1.6s var(--ease-out) 2.1s both; }
@keyframes fresh { from { background: #c8d7e6; } to { background: transparent; } }

.rail { grid-column: 2; grid-row: 1 / 3; display: flex; flex-direction: column; gap: 28px; padding-top: 24px; }
.phone {
  --r: 1.5deg; z-index: 2; width: min(300px, 100%); align-self: center;
  background: #1c212b; border-radius: 36px; /* taste-skill-ignore: the phone is the desk's one rounded object */
  padding: 24px 18px; display: flex; flex-direction: column; min-height: 440px;
}
.notch { display: flex; gap: 5px; justify-content: center; padding-bottom: 20px; }
.notch i { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-2); }
.chat { display: flex; flex-direction: column; gap: 14px; }
.bubble { font-size: var(--t-s); line-height: 1.45; padding: 14px 16px; }
.sms-in { background: var(--paper); color: var(--ink); border-radius: 18px 18px 18px 4px; }
.sms-in b { display: block; margin-bottom: 4px; color: var(--accent-deep); }
.reply { align-self: flex-end; background: rgb(136 192 208 / 0.22); color: var(--on-dark); border-radius: 18px 18px 4px 18px; }
.fee { align-self: flex-end; font-size: var(--t-s); color: var(--on-dark-2); margin-top: -6px; }

.ticket {
  --r: -2deg; width: min(240px, 88%); align-self: flex-end;
  background: var(--frost); color: var(--ink); font-size: var(--t-s); font-weight: 600; line-height: 1.45; padding: 12px 14px; text-align: right;
}
.ticket.t2 { --r: 1.5deg; align-self: flex-start; background: var(--paper-2); text-align: left; }

.cta-card {
  --r: 2deg; grid-column: 1; grid-row: 2; z-index: 3; align-self: start;
  width: min(320px, 90%); margin: -48px 0 0 8px;
  background: var(--paper); color: var(--ink); padding: 20px 22px;
}
.cta-card h2, .cta-card h3 { font: 700 var(--t-m)/1.1 var(--cond); text-transform: uppercase; margin-bottom: 14px; }
.btn {
  display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 22px;
  background: var(--ink); color: var(--paper); font-weight: 600; font-size: var(--t-b); text-decoration: none;
  transition: transform 150ms var(--ease-out), background-color 150ms ease;
}
.btn:active { transform: scale(0.97); }
.alt { margin-top: 10px; font-size: var(--t-s); color: var(--ink-2); text-align: center; }
.alt a { color: var(--ink); font-weight: 500; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--accent-deep); }
  .alt a:hover { color: var(--accent-deep); }
}

.inscription { position: absolute; right: var(--m); bottom: 14px; font-size: var(--t-s); color: var(--on-dark-2); text-align: right; }

/* the phone tells the story once: SMS lands, CashDB answers, the book row flashes */
.js .sms-in { animation: msg 600ms var(--ease-out) 900ms both; }
.js .reply { animation: msg 600ms var(--ease-out) 1600ms both; }
.js .fee { animation: msg 500ms var(--ease-out) 2000ms both; }
@keyframes msg { from { opacity: 0; transform: translateY(14px); } }
.js .hero .obj { animation: settle 800ms var(--ease-out) both; }
.js .hero .phone { animation-delay: 120ms; }
.js .hero .cta-card { animation-delay: 240ms; }
.js .hero .ticket { animation-delay: 340ms; }
.js .hero .ticket.t2 { animation-delay: 420ms; }
@keyframes settle { from { opacity: 0; transform: translateY(24px) rotate(0deg); } }

/* ---------- showcase: the live SMS reader, a sheet of work on the counter */
main > section { margin-top: var(--gap); }
.demo {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px);
  margin-top: 0 !important; padding: calc(var(--m) * 2.5) var(--m);
  align-items: center;
}
.work { background: var(--paper); color: var(--ink); padding: clamp(20px, 3vw, 40px); display: flex; flex-direction: column; gap: 16px; }
.sms { background: #fff; border-radius: 18px 18px 18px 4px; padding: 14px 16px; }
.sms-from { display: flex; align-items: center; gap: 8px; font-size: var(--t-s); color: var(--ink-2); margin-bottom: 6px; }
.sms-from input { font: 600 var(--t-s)/1.4 "IBM Plex Sans", sans-serif; color: var(--ink); border: 0; border-bottom: 1px dashed var(--rule); background: none; padding: 2px 0; width: 14ch; }
.sms textarea { width: 100%; resize: vertical; border: 0; background: none; color: var(--ink); font: 400 var(--t-b)/1.45 "IBM Plex Sans", sans-serif; padding: 0; min-height: 4.5em; }
.sms input:focus, .sms textarea:focus { outline: none; }
.sms:focus-within { box-shadow: 0 0 0 3px var(--frost); } /* taste-skill-ignore: inside a data-ui app fragment */
.becomes { display: grid; place-items: center; color: var(--accent); }
.becomes svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.result { display: grid; gap: 6px; background: #fff; padding: 16px 18px; transition: opacity 200ms ease, transform 300ms var(--ease-out); }
.result.swap { opacity: 0; transform: translateY(-10px); }
.r-book { font-size: var(--t-s); color: var(--ink-2); font-weight: 500; }
.r-row { display: flex; justify-content: space-between; gap: 16px; font-size: var(--t-m); font-weight: 600; }
.r-who { overflow-wrap: anywhere; }
.r-meta, .r-bal, .r-fee { font-size: var(--t-s); color: var(--ink-2); overflow-wrap: anywhere; }
.r-fee b { color: var(--ink); }
.result.ignored .r-row { color: var(--ink-2); }

.demo-side { display: flex; flex-direction: column; gap: 40px; align-items: flex-start; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.tabs button { background: none; border: 0; padding: 4px 0; font: 500 var(--t-b)/1.3 "IBM Plex Sans", sans-serif; color: var(--on-dark-2); cursor: pointer; border-bottom: 3px solid transparent; transition: color 150ms ease, border-color 150ms ease; }
.tabs button[aria-selected="true"] { color: var(--on-dark); border-color: var(--frost); }
.demo h2 { font: 700 var(--t-l)/1 var(--cond); text-transform: uppercase; margin-bottom: 24px; text-wrap: balance; }
.demo-text { max-width: 44ch; color: var(--on-dark); }
.demo-side .cta-card { position: static; width: min(340px, 100%); margin: 0; }
@media (hover: hover) and (pointer: fine) { .tabs button:hover { color: var(--on-dark); } }

/* ---------- features: the day's paperwork, spread across the counter */
.paperwork { padding: 0 var(--m); }
.paperwork .section-title { margin-bottom: clamp(48px, 6vw, 80px); }
.sheet {
  width: min(1040px, 100%); background: var(--paper); color: var(--ink);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 3.5vw, 56px); align-items: center;
  padding: clamp(28px, 4vw, 56px);
}
.sheet + .sheet { margin-top: clamp(32px, 4vw, 56px); }
.s1, .s3, .s5 { --r: -1deg; margin-right: auto; }
.s2, .s4 { --r: 1deg; margin-left: auto; }
.s2 .sheet-copy, .s4 .sheet-copy { order: 2; }
.s2 .shot, .s4 .shot { order: 1; }
.sheet h3 { font: 700 var(--t-m)/1 var(--cond); text-transform: uppercase; }
.sheet p { max-width: 40ch; font-size: 1.125rem; margin-top: 20px; }
.shot { margin: 0; display: grid; place-items: center; padding: clamp(20px, 3vw, 48px); background: var(--paper-2); }

/* app fragments inside the paperwork: the product's own surfaces */
.ui-dialog {
  width: min(100%, 420px); background: #fff; color: var(--ink); border-radius: 12px; padding: 20px;
  display: grid; gap: 10px; font-size: var(--t-s); box-shadow: 0 18px 40px rgb(46 52 64 / 0.22); /* taste-skill-ignore: inside a data-ui app fragment */
}
.ui-title { font-size: var(--t-b); }
.ui-sub { color: var(--ink-2); }
.ui-big { font-size: var(--t-m); font-weight: 600; letter-spacing: -0.02em; }
.ui-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ui-pair > div { background: var(--paper); border-radius: 8px; padding: 10px; display: grid; gap: 2px; }
.ui-pair b { font-size: var(--t-b); }
.ui-label { font-weight: 600; }
.ui-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-weight: 600; color: var(--accent-deep); }
.ui-primary { background: var(--accent-deep); color: #fff; border-radius: 6px; padding: 6px 14px; margin: -6px 0; }
.ui-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ui-chips span { border: 1px solid var(--rule); border-radius: 6px; padding: 6px 10px; font-weight: 500; } /* taste-skill-ignore: inside a data-ui app fragment */
.ui-chips .likely { background: #d9e4f0; border-color: var(--accent); }
.ui-chips .plain { border-color: transparent; color: var(--accent-deep); }
.ui-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--rule); } /* taste-skill-ignore: inside a data-ui app fragment */
.ui-check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.ui-check .box { width: 18px; height: 18px; border-radius: 4px; background: var(--accent); position: relative; }
.ui-check .box::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; rotate: 45deg; }
.ui-bars { display: flex; align-items: flex-end; gap: 2px; height: 110px; border-bottom: 1px solid var(--rule); } /* taste-skill-ignore: inside a data-ui app fragment */
.ui-bars i { flex: 1; height: var(--h); min-height: 2px; background: var(--accent); border-radius: 2px 2px 0 0; transform-origin: bottom; }
.ui-bars i.spike { background: var(--out); }
.ui-meter { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
.ui-meter i { grid-column: 1 / -1; position: relative; height: 8px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.ui-meter i::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--accent); border-radius: inherit; }
.ui-meter i.over::before { background: var(--out); }

/* ---------- how it works: a receipt pinned to the counter */
.setup {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center;
  padding: 0 var(--m);
}
.setup-copy { grid-column: 1 / 6; }
.setup-copy p { max-width: 30ch; margin-top: 28px; font-size: var(--t-m); line-height: 1.35; color: var(--on-dark); }
.slip {
  --r: 1deg; grid-column: 7 / 12; position: relative; background: var(--paper); color: var(--ink); padding: 40px 32px 56px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), 95% 100%, 90% calc(100% - 14px), 85% 100%, 80% calc(100% - 14px), 75% 100%, 70% calc(100% - 14px), 65% 100%, 60% calc(100% - 14px), 55% 100%, 50% calc(100% - 14px), 45% 100%, 40% calc(100% - 14px), 35% 100%, 30% calc(100% - 14px), 25% 100%, 20% calc(100% - 14px), 15% 100%, 10% calc(100% - 14px), 5% 100%, 0 calc(100% - 14px)); /* taste-skill-ignore: the torn foot of a real till slip */
}
.tape {
  position: absolute; top: -14px; left: 50%; width: 110px; height: 30px; translate: -50% 0; rotate: -4deg;
  background: rgb(136 192 208 / 0.75);
}
.slip h3 { font: 600 var(--t-b)/1.2 "IBM Plex Sans", sans-serif; margin: 28px 0 10px; }
.slip h3:first-of-type { margin-top: 0; }
.line { display: flex; align-items: baseline; gap: 10px; padding: 5px 0; font-size: var(--t-b); }
.line i { flex: 1; min-width: 24px; border-bottom: 4px dotted #b8c1cf; transform: translateY(-4px); }
.line span:last-child { color: var(--ink-2); white-space: nowrap; }
.total { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; margin: 28px -32px 0; padding: 0 32px; background: var(--ink); color: var(--paper); font-weight: 600; }

/* ---------- faq: the notebook page, kept flat for reading */
.faq { padding: 0 var(--m); }
.notebook {
  width: 100%; background: var(--paper); color: var(--ink);
  padding: clamp(32px, 5vw, 72px);
}
.notebook h2 { font: 700 var(--t-l)/1 var(--cond); text-transform: uppercase; margin-bottom: clamp(32px, 4vw, 56px); }
.answers { columns: 2; column-gap: 56px; }
.answers p { break-inside: avoid; margin-bottom: 20px; }
.answers b { font-weight: 600; }

/* ---------- closing: the counter clears to the closing ask */
.cta { margin-top: clamp(64px, 8vw, 120px) !important; }
.band {
  display: grid; place-items: center; padding: clamp(64px, 9vw, 128px) var(--m);
}
.cta-card.final { position: static; --r: -1deg; width: min(620px, 100%); margin: 0; padding: clamp(28px, 4vw, 48px); text-align: center; }
.closing { font: 700 var(--t-m)/1.25 var(--cond); text-transform: uppercase; margin-bottom: 24px; text-wrap: balance; }
.cta-card.final .btn { width: 100%; }

/* ---------- footer: the back edge of the counter */
.tiles { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; padding: 8px; background: var(--desk); margin-top: clamp(64px, 8vw, 120px); }
.tile { background: var(--ground); padding: 24px; min-height: 220px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.t-statement { grid-column: 1 / 5; background: var(--paper); color: var(--ink); }
.t-statement > p:first-child { font-size: var(--t-m); line-height: 1.25; max-width: 18ch; }
.t-nav { grid-column: 5 / 8; }
.t-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.t-nav a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .t-nav a:hover { color: var(--frost); } }
.t-time { grid-column: 8 / 10; font-size: var(--t-m); }
.clock { font-size: var(--t-b); color: var(--on-dark-2); }
.t-unit { grid-column: 10 / 13; font-size: var(--t-m); background: var(--paper-2); color: var(--ink); justify-content: flex-end; text-align: right; }
.t-mark { grid-column: 1 / 9; min-height: 320px; background: var(--paper); color: var(--ink); display: grid; place-items: center; font: 700 clamp(4rem, 13vw, 12rem)/0.8 var(--cond); letter-spacing: -0.03em; overflow: hidden; }
.t-go { grid-column: 9 / 13; min-height: 320px; background: var(--frost); color: var(--ink); text-decoration: none; font: 700 var(--t-m)/1.1 var(--cond); text-transform: uppercase; transition: background-color 150ms ease; }
.t-go svg { align-self: flex-end; width: 64px; height: 64px; fill: none; stroke: currentColor; stroke-width: 4; transition: transform 250ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .t-go:hover svg { transform: translate(6px, -6px); } .t-go:hover { background: #9fcdda; } }
.t-go:active { transform: scale(0.99); }

/* ---------- entrances (only when JS is on, so content never stays hidden) */
.js .reveal { opacity: 0; transform: translateY(24px) rotate(0deg); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: var(--d, 0ms); }
.js .reveal.seen { opacity: 1; transform: translateY(0) rotate(var(--r, 0deg)); }
.js .sheet .shot .ui-dialog { transition: transform 700ms var(--ease-out), opacity 700ms var(--ease-out); }
.js .sheet:not(.seen) .shot .ui-dialog { opacity: 0; transform: translateY(32px) scale(0.98); }
.js .sheet:not(.seen) .ui-bars i { transform: scaleY(0.2); }
.ui-bars i { transition: transform 900ms var(--ease-out); transition-delay: calc(var(--n, 0) * 18ms + 250ms); }

/* ---------- tablet & phone: the desk, tidied into one pile */
@media (max-width: 1023px) {
  .hero { justify-content: flex-start; }
  .scene { display: flex; flex-direction: column; align-items: center; }
  .rail { display: contents; }
  .book { width: 100%; order: 1; --r: 0deg; }
  .ledger { width: calc(100% + 48px); margin-inline: -24px; }
  .ledger caption { padding-inline: 24px; }
  .ledger td:first-child { padding-left: 24px; }
  .ledger .n { padding-right: 10px; }
  .cta-card { order: 2; margin: -32px auto 0; width: min(340px, calc(100% - 32px)); }
  .phone { order: 3; margin: 40px auto 0; }
  .ticket { order: 4; margin: 28px auto 0; align-self: center; }
  .ticket.t2 { order: 5; margin: 16px auto 0; align-self: center; }
  .inscription { position: static; margin: 40px 0 0; text-align: right; align-self: flex-end; }
  .demo { grid-template-columns: 1fr; gap: 48px; }
  .demo-side .cta-card { margin: 0; }
  .sheet { grid-template-columns: 1fr; }
  .s2 .sheet-copy, .s4 .sheet-copy { order: 1; }
  .s2 .shot, .s4 .shot { order: 2; }
  .setup-copy { grid-column: 1 / -1; margin-bottom: 48px; }
  .slip { grid-column: 2 / 12; }
  .answers { columns: 1; }
}
@media (max-width: 719px) {
  .hero { padding: 88px 16px 32px; }
  .sheet { padding: 24px 20px; }
  .sheet p { font-size: var(--t-b); }
  .s1, .s3, .s5, .s2, .s4 { --r: 0deg; }
  .ui-pair { grid-template-columns: 1fr; }
  .slip { grid-column: 1 / -1; --r: 0deg; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; }
  .tile { min-height: 0; padding: 20px; }
  .t-mark { grid-column: 1 / -1; min-height: 160px; font-size: 22vw; }
  .t-go { grid-column: 1 / -1; min-height: 160px; }
  .t-nav, .t-unit, .t-time, .t-statement { grid-column: span 1; }
  .t-statement, .t-unit { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .hero .obj, .js .sms-in, .js .reply, .js .fee { animation: none; }
  .js .reveal, .js .sheet .shot .ui-dialog { transform: none !important; transition: opacity 300ms ease; }
  .js .sheet:not(.seen) .ui-bars i { transform: none; }
  .js .book .fresh { animation: none; }
}
