/* LedgerKit landing site. Tokens follow the product's design system (LedgerKit docs/DESIGN.md):
   ledger paper, bank ink, ledger rules, and one signature device, the double rule under a total. */

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('fonts/inter-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --paper: #f9fdfb;
  --sheet: #ffffff;
  --ink: #172232;
  --ink-muted: #4d5a6c;
  --bank-ink: #24569f;
  --bank-ink-hover: #1c4580;
  --on-bank-ink: #f9fbff;
  --rule: #d7e1dc;
  --rule-strong: #2e3a4d;
  --tint: #edf2f9;
  --settled: #1f6b4f;
  --focus: #24569f;
  --radius-md: 4px;
  --radius-lg: 6px;
  --measure: 68ch;
  --page: 1120px;
  --gutter: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #10171e;
    --sheet: #161e26;
    --ink: #e6ecf2;
    --ink-muted: #a9b4c1;
    --bank-ink: #7aaeef;
    --bank-ink-hover: #9cc3f5;
    --on-bank-ink: #0f1a2b;
    --rule: #2c343d;
    --rule-strong: #c3ccd6;
    --tint: #1b2733;
    --settled: #7fd3ac;
    --focus: #7aaeef;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter Variable', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'cv05', 'cv08';
  font-size: 1.0625rem;
  line-height: 1.65;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--bank-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--bank-ink-hover);
}

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

.num {
  font-variant-numeric: tabular-nums;
}

code {
  font-family: ui-monospace, 'Cascadia Code', Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 1px 5px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  background: var(--sheet);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: 8px 12px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  z-index: 10;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.wordmark:hover {
  color: var(--ink);
}

.wordmark small {
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--ink-muted);
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.9375rem;
}

.site-nav a:not(.button) {
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:not(.button):hover {
  text-decoration: underline;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--bank-ink);
  background: var(--bank-ink);
  color: var(--on-bank-ink);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.button:hover {
  background: var(--bank-ink-hover);
  border-color: var(--bank-ink-hover);
  color: var(--on-bank-ink);
}

.button.secondary {
  background: transparent;
  color: var(--bank-ink);
}

.button.secondary:hover {
  background: var(--tint);
  color: var(--bank-ink-hover);
}

.site-nav .button {
  min-height: 36px;
  padding: 6px 14px;
}

/* Sections */

main > section {
  padding: 72px 0;
  border-bottom: 1px solid var(--rule);
}

main > section:last-child {
  border-bottom: 0;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  letter-spacing: -0.02em;
  max-width: 30ch;
}

.section-intro {
  margin: 12px 0 0;
  max-width: var(--measure);
  color: var(--ink-muted);
}

/* Hero */

.hero {
  padding-top: 64px;
}

.hero h1 {
  font-size: clamp(2.25rem, 1.4rem + 3.6vw, 3.75rem);
  letter-spacing: -0.035em;
  line-height: 1.04;
  max-width: 17ch;
}

.hero .lede {
  margin: 24px 0 0;
  max-width: 60ch;
  font-size: 1.1875rem;
  line-height: 1.6;
}

.hero .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero .note {
  margin: 14px 0 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
  max-width: 60ch;
}

.hero figure {
  margin: 48px 0 0;
}

.frame {
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--sheet);
}

/* Features: a ruled two-column list, like a chart of accounts */

.ledger-list {
  margin: 40px 0 0;
  border-top: 1px solid var(--rule-strong);
}

.ledger-list div {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 8px 32px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}

.ledger-list dt {
  font-weight: 600;
}

.ledger-list dd {
  margin: 0;
  max-width: var(--measure);
  color: var(--ink-muted);
}

/* Screens */

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 32px;
  margin-top: 40px;
}

.gallery figure {
  margin: 0;
}

.gallery figcaption,
.hero figcaption {
  margin-top: 10px;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.gallery a {
  display: block;
}

.gallery .phone {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 24px;
  align-items: end;
}

.gallery .phone figcaption {
  margin: 0 0 4px;
}

/* Stack */

.spec {
  width: 100%;
  margin-top: 40px;
  border-collapse: collapse;
  font-size: 1rem;
}

.spec th,
.spec td {
  text-align: left;
  vertical-align: top;
  padding: 14px 24px 14px 0;
  border-bottom: 1px solid var(--rule);
}

.spec thead th {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--rule-strong);
  padding-top: 0;
}

.spec tbody th {
  font-weight: 600;
  width: 12rem;
}

.spec td {
  color: var(--ink-muted);
}

.fine {
  margin: 20px 0 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
  max-width: var(--measure);
}

/* Pricing: a statement, totalled with a double rule */

.statement-wrap {
  margin-top: 40px;
  overflow-x: auto;
}

.statement {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  border-spacing: 0;
}

.statement th,
.statement td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.statement thead th {
  border-bottom: 1px solid var(--rule-strong);
  font-size: 1.125rem;
  font-weight: 600;
  text-align: right;
}

.statement thead th:first-child {
  text-align: left;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  vertical-align: bottom;
}

.statement thead th span {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--ink-muted);
}

.statement tbody th {
  text-align: left;
  font-weight: 400;
}

.statement tbody td {
  text-align: right;
  white-space: nowrap;
}

.statement td.text {
  white-space: normal;
  max-width: 15rem;
  color: var(--ink-muted);
}

.statement .included {
  color: var(--settled);
  font-weight: 500;
}

.statement tr.total th,
.statement tr.total td {
  border-top: 1px solid var(--rule-strong);
  border-bottom: 0;
  padding-bottom: 4px;
  font-weight: 600;
}

.statement tr.total td {
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* The double rule under the total, as on a paper statement. */
.statement tr.total td .amount {
  display: inline-block;
  padding-bottom: 6px;
  border-bottom: 3px double var(--rule-strong);
}

.statement tr.buy td {
  border-bottom: 0;
  padding-top: 16px;
  padding-bottom: 20px;
}

.statement tr.buy td:first-child {
  border-bottom: 0;
}

.statement tr.buy .button {
  width: 100%;
  max-width: 180px;
}

/* FAQ */

.faq {
  margin-top: 32px;
  max-width: 820px;
  border-top: 1px solid var(--rule-strong);
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  font-weight: 600;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  flex: none;
  width: 1.25rem;
  text-align: center;
  font-weight: 400;
  color: var(--ink-muted);
}

.faq details[open] summary::after {
  content: '\2212';
}

.faq details > div {
  padding: 0 0 20px;
  max-width: var(--measure);
  color: var(--ink-muted);
}

.faq details > div p {
  margin: 0 0 12px;
}

.faq details > div p:last-child {
  margin-bottom: 0;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 40px 0 56px;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.site-footer .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 48px;
}

.site-footer p {
  margin: 0 0 8px;
  max-width: 62ch;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

/* Single-message pages: thanks, not found, demo resetting */

.message {
  min-height: calc(100vh - 65px);
  display: flex;
  align-items: center;
  padding: 64px 0;
}

.message h1 {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 2.75rem);
  letter-spacing: -0.03em;
  max-width: 20ch;
}

.message p {
  margin: 16px 0 0;
  max-width: 58ch;
}

.message .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* Legal pages: one long reading column */

.legal {
  padding: 56px 0 72px;
}

.legal article {
  max-width: var(--measure);
}

.legal h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.5rem);
  letter-spacing: -0.03em;
}

.legal .updated {
  margin: 10px 0 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.legal h2 {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  margin: 40px 0 0;
  max-width: none;
}

.legal p,
.legal li {
  line-height: 1.7;
}

.legal p {
  margin: 14px 0 0;
}

.legal ul,
.legal ol {
  margin: 14px 0 0;
  padding-left: 1.4em;
}

.legal li + li {
  margin-top: 6px;
}


/* Small screens */

@media (max-width: 760px) {
  :root {
    --gutter: 16px;
  }

  main > section {
    padding: 56px 0;
  }

  .site-nav .hide-small {
    display: none;
  }

  .ledger-list div {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .gallery .phone {
    grid-template-columns: minmax(0, 200px);
  }

  .spec tbody th {
    width: 7.5rem;
  }

  .site-footer .wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  /* The pricing statement fits a phone screen: both licences stay side by side. */
  .statement {
    min-width: 0;
    font-size: 0.9375rem;
  }

  .statement th,
  .statement td {
    padding: 12px 10px;
  }

  .statement thead th {
    font-size: 1rem;
  }

  .statement tr.total td {
    font-size: 1.375rem;
  }

  .statement tr.buy .button {
    max-width: none;
    padding: 10px 8px;
  }
}
