:root {
  --ink: #14202e;
  --ink-soft: #3a4656;
  --muted: #5d6877;
  --paper: #fbfaf7;
  --paper-alt: #f3f0ea;
  --line: #e3ded4;
  --line-strong: #cbc3b5;
  --card: #ffffff;
  --accent: #b4532a;
  --accent-ink: #973f1c;
  --accent-wash: #f6e7df;
  --night: #121c28;
  --night-line: #2c3a4b;
  --night-text: #d9e0e8;
  --night-muted: #9aa8b8;
  --night-accent: #f0a37f;
  --code-key: #f0a37f;
  --code-str: #b9dcb0;
  --code-num: #f5d38c;
  --code-com: #7d8ea2;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 72rem;
  --header-h: 64px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

code,
pre {
  font-family: var(--mono);
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 16px;
}

@media (min-width: 640px) {
  .wrap {
    padding-inline: 24px;
  }
}

@media (min-width: 960px) {
  .wrap {
    padding-inline: 32px;
  }
}

.skip {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 100;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}

.skip:focus {
  left: 16px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(251 250 247 / 0.9);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand .mark {
  width: 28px;
  height: 28px;
}

.wordmark {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.byline {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

@media (max-width: 819px) {
  .site-nav {
    display: none;
  }

  .header-cta {
    margin-left: auto;
  }
}

@media (max-width: 479px) {
  .byline {
    display: none;
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition:
    background-color 0.15s,
    border-color 0.15s;
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-ink);
}

.btn-secondary {
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--card);
  border-color: var(--ink-soft);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Shared section type */

.section {
  padding-block: clamp(4rem, 9vw, 7rem);
}

section[id] {
  scroll-margin-top: var(--header-h);
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.section-lede {
  max-width: 36em;
  margin: 0 0 2.5rem;
  color: var(--ink-soft);
  font-size: 1.125rem;
}

.fine {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Hero */

.hero {
  padding-block: clamp(3rem, 8vw, 6.5rem) clamp(3.5rem, 7vw, 5.5rem);
}

.hero-grid {
  display: grid;
  gap: 3.5rem;
  align-items: center;
}

.hero-grid > * {
  min-width: 0;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.05fr 1fr;
    gap: 4rem;
  }
}

/* Each phrase of the headline gets its own line. "Bank statements in." is ~8.5em wide, so the size
   follows the column width (with ~9% to spare for wider system fonts) rather than the viewport. */
h1 {
  margin: 0 0 1.25rem;
  font-size: min(4.2rem, 10.75vw - 5px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

h1 span {
  display: block;
}

@media (min-width: 960px) {
  h1 {
    font-size: min(3.5rem, 5.5vw - 7px);
  }
}

.lede {
  max-width: 34em;
  margin: 0 0 2rem;
  color: var(--ink-soft);
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  line-height: 1.55;
}

/* Hero illustration: a statement and the JSON read from it. Decorative; aria-hidden. */

.doc {
  width: 94%;
  padding: 1.1rem 1.25rem 3rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow:
    0 1px 2px rgb(20 32 46 / 0.06),
    0 18px 40px -18px rgb(20 32 46 / 0.25);
  font-size: 0.78rem;
  transform: rotate(-1deg);
}

.doc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
}

.doc-file {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
}

.pdf-badge {
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: var(--accent-wash);
  color: var(--accent-ink);
  font-family: var(--font);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.doc-title {
  font-size: 0.95rem;
  font-weight: 700;
}

.doc-sub {
  margin-bottom: 0.9rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.doc-rows {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  row-gap: 0.4rem;
  margin-inline: -0.45rem;
  font-variant-numeric: tabular-nums;
}

/* Cells carry the column spacing as padding, so a highlighted row reads as one band. */
.doc-rows span {
  padding-inline: 0.45rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.doc-rows .th {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.doc-rows .num {
  text-align: right;
}

.doc-rows .out {
  color: var(--ink-soft);
}

.doc-rows .hl {
  background: var(--accent-wash);
}

.json-card {
  position: relative;
  width: min(100%, 23rem);
  margin: -2.5rem 0 0 auto;
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  background: var(--night);
  color: var(--night-text);
  box-shadow: 0 24px 48px -20px rgb(18 28 40 / 0.55);
  font-size: 0.72rem;
  line-height: 1.55;
}

.json-card pre {
  margin: 0;
  overflow: hidden;
}

@media (max-width: 479px) {
  .doc-rows .bal {
    display: none;
  }

  .doc-rows {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .doc {
    width: 100%;
  }

  .json-card {
    width: 94%;
    margin-top: -2rem;
    font-size: 0.68rem;
  }
}

/* Syntax colours, shared by the hero card and the code samples */

.k {
  color: var(--code-key);
}

.s {
  color: var(--code-str);
}

.n {
  color: var(--code-num);
}

.c {
  color: var(--code-com);
}

/* Banks */

.banks {
  padding-block: 2.5rem;
  border-block: 1px solid var(--line);
  background: var(--paper-alt);
}

.kicker {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bank-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bank-list li {
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 600;
}

.bank-list small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}

/* How it works */

.how-grid {
  display: grid;
  gap: 3rem;
}

.how-grid > * {
  min-width: 0;
}

@media (min-width: 960px) {
  .how-grid {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 4rem;
  }
}

.steps {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  margin-bottom: 1.75rem;
  padding-left: 3.25rem;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: -0.15rem;
  left: 0;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--accent-wash);
  color: var(--accent-ink);
  font-weight: 700;
}

.steps p {
  margin: 0;
  color: var(--ink-soft);
}

.code {
  margin: 0 0 1rem;
  overflow: hidden;
  border: 1px solid var(--night-line);
  border-radius: 12px;
  background: var(--night);
}

.code figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--night-line);
  color: var(--night-muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.code pre {
  margin: 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  color: var(--night-text);
  font-size: 0.8rem;
  line-height: 1.6;
  tab-size: 2;
}

/* Checks */

.checks {
  background: var(--paper-alt);
  border-top: 1px solid var(--line);
}

.cards {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.card p {
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
}

.icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  background: var(--accent-wash);
  color: var(--accent-ink);
}

.icon svg {
  width: 22px;
  height: 22px;
}

.sample {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}

.sample-label {
  display: inline-block;
  margin-right: 0.4rem;
  padding: 0.05rem 0.45rem;
  border-radius: 4px;
  background: var(--paper-alt);
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sample code {
  overflow-wrap: anywhere;
  color: var(--ink-soft);
}

/* Data handling */

.data {
  background: var(--night);
  color: var(--night-text);
}

.data h2 {
  color: #fff;
}

.data .eyebrow {
  color: var(--night-accent);
}

.data .section-lede {
  color: var(--night-muted);
}

.data :focus-visible {
  outline-color: var(--night-accent);
}

.points {
  display: grid;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 820px) {
  .points {
    grid-template-columns: repeat(3, 1fr);
  }
}

.points li {
  padding-top: 1.25rem;
  border-top: 1px solid var(--night-line);
}

.points h3 {
  color: #fff;
}

.points p {
  margin: 0;
  color: var(--night-muted);
}

/* Closing call to action */

.closing {
  text-align: center;
}

.closing .section-lede {
  margin-inline: auto;
  margin-bottom: 2rem;
}

.closing .cta-row {
  justify-content: center;
}

/* Footer */

.site-footer {
  padding-block: 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--ink-soft);
}
