/* ---- Tokens ---- */
:root {
  --blue: #1E3A8A;
  --blue-dark: #16296B;
  --near-black: #0B0C10;
  --white: #FFFFFF;
  --orange: #F2622E;
  --orange-dark: #D14A1B;
  /* Contrast-safe orange for TEXT and the button hover background. The
     --orange-dark token as specified reaches only 4.38:1 with near-black text
     and 4.46:1 with white text — both just under the 4.5:1 AA minimum. This
     darker value gives white text 4.8:1. Used only where orange must carry
     text; --orange and --orange-dark are untouched for fills and borders. */
  --orange-text: #C9461A;
  --yellow: #F5C518;
  --green: #1E8A5F;
  --green-dark: #156B49;
  /* Muted body copy and fine print. 6.2:1 on white. */
  --muted: #5A6270;
  --body-soft: #3A4149;
  /* Alternating section fill. A touch deeper than #F7F8FA so the boundary
     between a white module and a tinted one stays visible on ordinary laptop
     screens, while still reading as a subtle tint. */
  --tint: #F4F6FA;
  /* Background of the notice-at-collection callout. */
  --blue-tint: #EEF2FB;
  /* Structural rules: 2px solid, near-black. */
  --line: var(--near-black);
  --font-head: 'Space Grotesk', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  /* Content cap. Section backgrounds run full-width behind it. */
  --content-max: 1080px;
  /* Reading measure for long-form text (legal pages, confirmation). */
  --prose-max: 760px;
}

/* ---- Reset & base ---- */
/* Sharp corners everywhere — no element on the site gets a radius */
* { box-sizing: border-box; border-radius: 0; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--near-black);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Keeps the footer at the bottom on short pages (e.g. thanks.html) instead of
     leaving a band of background beneath it */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; }
.wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 32px;
}
.prose { max-width: var(--prose-max); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Keyboard focus indicator for every interactive element. 3px blue with an
   offset reads clearly on white, the tinted sections, and the orange button. */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: 3.4rem; color: var(--blue); letter-spacing: -0.03em; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.4em; }
p { margin: 0 0 1em; max-width: 68ch; }
.rule {
  border: none;
  border-top: 2px solid var(--line);
  margin: 0;
}
/* Key figures — dollar amounts and other values that should stand out.
   Inter Bold at a larger size in an accent colour; never a different font
   family. Blue by default; the orange variant uses the AA-safe text orange. */
.key-figure {
  font-weight: 700;
  font-size: 1.5em;
  line-height: 1.2;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.key-figure-orange { color: var(--orange-text); }

/* Visible only when tabbed to — lets keyboard users jump the nav */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--near-black);
  color: var(--white);
  padding: 10px 18px;
  z-index: 40;
}
.skip-link:focus {
  left: 0;
  text-decoration: none;
}

/* ---- Header ---- */
.site-header {
  border-bottom: 2px solid var(--line);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.wordmark {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--near-black);
}
.wordmark:hover { text-decoration: none; color: var(--blue); }
/* Wraps rather than overflowing once the nav grew to four links */
.site-nav { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.site-nav a {
  color: var(--near-black);
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:hover, .site-nav a:active, .site-nav a[aria-current] {
  color: var(--blue);
  text-decoration: none;
}

/* ---- Sections ----
   Each homepage section is a distinct module: a full-width background
   (alternating white / tint, plus the one blue band) with the content capped
   inside a .wrap. No rules between sections — the fills do the separating. */
section {
  padding-top: 64px;
  padding-bottom: 64px;
}
.section-white { background: var(--white); }
.section-tint { background: var(--tint); }
.section-intro { color: var(--body-soft); }

/* ---- Hero ---- */
.hero {
  padding-top: 80px;
  padding-bottom: 72px;
}
.kicker {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin-bottom: 14px;
}
.lede {
  font-size: 1.1rem;
  color: var(--body-soft);
}
.btn-primary {
  display: inline-block;
  background: var(--orange);
  color: var(--near-black);
  font-family: var(--font-body);
  font-weight: 600;
  padding: 14px 28px;
  border: none;
  box-shadow: none;
  font-size: 1rem;
  line-height: 1.4;
  cursor: pointer;
  margin-top: 8px;
}
.btn-primary:hover {
  background: var(--orange-text);
  color: var(--white);
  text-decoration: none;
}
/* Trust bullets: small yellow square tags */
.trust-bar {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  font-size: 0.8rem;
  font-weight: 600;
}
.trust-bar li {
  background: var(--yellow);
  color: var(--near-black);
  padding: 6px 12px;
  line-height: 1.3;
}

/* ---- Closing CTA ---- */
.closing-cta p { color: var(--body-soft); }

/* ---- Contrast band (How it works) ----
   The one section on the site with a coloured background. Full-bleed; its
   inner .wrap keeps the content aligned with everything else. */
.band {
  background: var(--blue);
  color: var(--white);
}
.band h2, .band h3 { color: var(--white); }
.band .ledger-steps p { color: #E5E7EB; }
.band .ledger-num { color: var(--yellow); }
/* On wide screens the three steps sit side by side as columns */
.band .ledger-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 28px;
}
.band .ledger-steps li {
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

/* ---- Ledger steps (How it works, and the thanks page) ---- */
.ledger-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.ledger-steps li {
  display: flex;
  gap: 20px;
  align-items: baseline;
}
/* Step numerals: Space Grotesk Bold with tabular figures so 01/02/03 line up.
   Replaces the old monospace numerals at the same visual weight. */
.ledger-num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  color: var(--blue);
  flex-shrink: 0;
  min-width: 2ch;
}
.ledger-steps h3 { margin-bottom: 0.2em; }
.ledger-steps p { margin: 0; color: var(--body-soft); }

/* ---- Qualifier form card ----
   The page's main conversion element, so it gets its own raised panel: white,
   2px blue border, generous padding, narrower than the section, centred, and
   lifted off the tinted section behind it with a hard offset shadow. */
.form-card {
  max-width: 680px;
  margin: 0 auto;
  background: var(--white);
  /* A deliberate, unmistakable box: heavier border plus a solid blue offset
     block behind the card, so the form reads as its own shape on the page. */
  border: 3px solid var(--blue);
  padding: 44px 48px 40px;
  box-shadow: 12px 12px 0 var(--blue);
}
.form-card h2 { margin-bottom: 0.4em; }

/* ---- Notice at collection (CCPA) ---- */
.notice {
  background: var(--blue-tint);
  border-left: 4px solid var(--blue);
  padding: 14px 18px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--body-soft);
}
.notice p { margin: 0; max-width: none; }
.notice strong { color: var(--near-black); }

/* ---- Forms ---- */
.ledger-form {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.field { display: flex; flex-direction: column; }
.field label {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 6px;
}
.field .optional { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  font-family: var(--font-body);
  /* 16px minimum keeps iOS Safari from zooming on focus */
  font-size: 1rem;
  padding: 11px 4px;
  background-color: transparent;
  border: none;
  border-bottom: 2px solid var(--line);
  color: var(--near-black);
  width: 100%;
}
.field textarea {
  resize: vertical;
  line-height: 1.5;
  min-height: 7em;
}
/* Small helper line under a field, tied to it with aria-describedby */
.field-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 6px 0 0;
}
/* Native select chrome varies wildly across platforms — draw our own chevron */
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230B0C10' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 11px;
}
/* The underline turns blue on focus; the 3px focus-visible outline above is
   the primary indicator, so it is deliberately NOT suppressed here. */
.field input:focus, .field select:focus, .field textarea:focus {
  border-bottom-color: var(--blue);
}

/* ---- Consent checkbox ----
   The underlined-field treatment doesn't suit a checkbox, so this borrows the
   same bottom rule for the row as a whole and keeps the native control (native
   checkboxes are already keyboard- and screen-reader-friendly). The whole
   label is the tap target, not just the box. */
.field-consent {
  border-bottom: 2px solid var(--line);
  padding-bottom: 16px;
}
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 0;
  cursor: pointer;
}
.consent-label input[type="checkbox"] {
  /* Reset the width:100% inherited from the shared field rule above */
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  border-bottom: none;
  accent-color: var(--blue);
  cursor: pointer;
  margin-top: 1px;
}
.consent-label span { color: var(--body-soft); }
.hidden-field { position: absolute; left: -9999px; }
.ledger-form .btn-primary {
  align-self: flex-start;
  margin-top: 10px;
}
.form-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  max-width: 56ch;
}
/* Live region for validation messages. Stays in the page (never display:none)
   so screen readers announce text the moment it's written into it. */
.form-status {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--near-black);
}

/* ---- Financing options ---- */
.options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}
.option {
  background: var(--white);
  border: 2px solid var(--line);
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
}
.option p { font-size: 0.95rem; color: var(--body-soft); }
/* margin-top:auto pins the tag + "best for" line to the bottom of every card,
   so the three tags line up across the row whatever the description length. */
.option .option-best {
  font-size: 0.9rem;
  color: var(--muted);
  margin: auto 0 0;
}
/* Category tag. Says the category in words ("Best for: signed POs") so the
   cards are not distinguished by colour alone. Text colours are the AA-safe
   variants: --green and --orange fail 4.5:1 as small text on white (4.3:1 and
   3.2:1), so the tags use --green-dark (6.5:1) and --orange-text (4.8:1). The
   card borders keep the true token colours. */
.option-tag {
  display: block;
  width: max-content;
  max-width: 100%;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  border: 2px solid currentColor;
  padding: 3px 8px;
  margin-bottom: 10px;
}
.option-blue   { border-color: var(--blue); }
.option-green  { border-color: var(--green); }
.option-orange { border-color: var(--orange); }
.option-blue   .option-tag { color: var(--blue); }
.option-green  .option-tag { color: var(--green-dark); }
.option-orange .option-tag { color: var(--orange-text); }

/* "How it works" link at the foot of each card, below the pinned tag line */
.option .option-link {
  margin-top: 14px;
  font-weight: 600;
  font-size: 0.95rem;
}

/* ---- Financing guide pages (PO financing, factoring, working capital) ---- */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--muted); text-decoration: underline; }
.guide-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 48px;
  margin-top: 12px;
}
.guide-cols h3 { margin-top: 0.4em; }
.content-list {
  margin: 0 0 1em;
  padding-left: 1.1em;
  color: var(--body-soft);
  max-width: 68ch;
}
.content-list li { margin-bottom: 0.5em; }
.guide .ledger-steps { margin-top: 28px; }
.options-grid a.option { color: inherit; }
.options-grid a.option:hover { text-decoration: none; }
.options-grid a.option:hover h3 { color: var(--blue); text-decoration: underline; }

/* ---- Trust ---- */
.trust p { color: var(--body-soft); font-size: 0.95rem; }

/* ---- FAQ ---- */
.faq-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
  margin-top: 12px;
}
.faq-item {
  padding: 22px 0;
  border-top: 2px solid var(--line);
}
.faq-item h3 { margin-bottom: 6px; }
.faq-item p { margin: 0; color: var(--body-soft); font-size: 0.97rem; }

/* ---- Legal and statement pages (privacy, terms, accessibility, opt-out) ---- */
.legal { padding-top: 56px; }
/* Content stays left-aligned with the header but capped at a reading measure */
.legal > * { max-width: var(--prose-max); }
/* Needs the .legal prefix to outrank the `.legal p` rule below it */
.legal .legal-meta {
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.6em;
}
.legal h2 {
  font-size: 1.15rem;
  margin-top: 2em;
  padding-top: 1.2em;
  border-top: 2px solid var(--line);
}
.legal p, .legal li { color: var(--body-soft); font-size: 0.95rem; }
.legal .lede { font-size: 1.05rem; }
.legal ul {
  margin: 0 0 1em;
  padding-left: 1.1em;
}
.legal li { margin-bottom: 0.5em; }
.legal .notice { font-size: 0.95rem; }

/* ---- Confirmation page ---- */
.confirmation .ledger-steps { margin: 28px 0 32px; }
.confirmation-sub {
  font-size: 1.25rem;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 2px solid var(--line);
}
.confirmation .form-note { margin-bottom: 24px; }

/* ---- Footer ---- */
.site-footer {
  border-top: 2px solid var(--line);
  background: var(--white);
}
/* On pages with no footer columns, the bottom bar supplies its own top padding */
.site-footer > .footer-bottom:first-child { padding-top: 28px; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 64px;
  padding-top: 40px;
  padding-bottom: 24px;
}
.footer-inner h2 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.4;
  margin: 0 0 10px;
  color: var(--near-black);
}
.footer-legal { max-width: 280px; }
.footer-inner a, .footer-link-button {
  display: block;
  color: var(--body-soft);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 6px;
}
/* "Cookie preferences" reopens the banner rather than navigating, so it is a
   real <button> styled to sit in the column like the links around it. */
.footer-link-button {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.footer-link-button:hover { text-decoration: underline; }
.footer-bottom {
  padding-bottom: 28px;
}
.footer-bottom p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}

/* ---- Cookie banner ----
   Bottom-fixed bar, not an overlay: the page stays fully usable behind it.
   site.js pads the body by the banner's height so it never hides the footer. */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: var(--white);
  border-top: 2px solid var(--near-black);
  box-shadow: 0 -8px 24px rgba(11, 12, 16, 0.1);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.cookie-banner p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
}
.cookie-actions { display: flex; gap: 12px; }
/* Accept and Reject are styled identically on purpose: declining should be
   exactly as easy and as prominent as accepting. */
.btn-choice {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  min-height: 44px;
  min-width: 112px;
  padding: 8px 20px;
  background: var(--white);
  color: var(--near-black);
  border: 2px solid var(--near-black);
  cursor: pointer;
}
.btn-choice:hover { background: var(--near-black); color: var(--white); }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .options-grid { grid-template-columns: 1fr; gap: 16px; }
  .band .ledger-steps { grid-template-columns: 1fr; gap: 28px; }
  .band .ledger-steps li { flex-direction: row; align-items: baseline; gap: 16px; }
  .faq-list { grid-template-columns: 1fr; }
  .guide-cols { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.5rem; }
  body { font-size: 16px; }

  /* One row can't hold the wordmark plus four nav links at this width, and a
     sticky two-row header would eat too much of a short viewport. Stack it and
     let it scroll away. */
  .site-header { position: static; }
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding-top: 12px;
    padding-bottom: 4px;
  }
  .wordmark { font-size: 1.05rem; }
  /* Touch targets: every nav link is at least 44x44. min-width matters for
     short labels — "FAQ" is only ~29px of text. */
  .site-nav { gap: 0 20px; }
  .site-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    font-size: 0.92rem;
  }
  .legal { padding-top: 40px; }

  section { padding-top: 48px; padding-bottom: 48px; }
  .hero { padding-top: 44px; padding-bottom: 48px; }
  .lede { font-size: 1.05rem; }
  .trust-bar { gap: 8px 10px; }

  .ledger-steps { gap: 26px; }
  .ledger-steps li { gap: 14px; }
  .ledger-num { font-size: 1.35rem; }

  .form-card {
    padding: 28px 20px 24px;
    /* Smaller offset on phones; stays inside the 20px page gutter */
    box-shadow: 8px 8px 0 var(--blue);
  }
  /* Full-width tap target beats a narrow button on a phone */
  .btn-primary { width: 100%; text-align: center; }
  /* The form is a flex column, so the button needs its self-alignment reset too */
  .ledger-form .btn-primary { align-self: stretch; }
  .consent-label input[type="checkbox"] { width: 24px; height: 24px; }

  .footer-inner { gap: 24px 40px; }
  /* Touch targets: footer links and the cookie-preferences button are 44px tall */
  .footer-inner a, .footer-link-button {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin-bottom: 0;
  }

  .cookie-banner-inner { padding-top: 12px; padding-bottom: 12px; }
  .cookie-actions { width: 100%; }
  .btn-choice { flex: 1; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
